[Libguestfs] [PATCH nbdkit] file: Implement cache=none and fadvise=normal|random|sequential.

Richard W.M. Jones rjones at redhat.com
Fri Aug 7 14:36:50 UTC 2020


On Fri, Aug 07, 2020 at 05:29:24PM +0300, Nir Soffer wrote:
> On Fri, Aug 7, 2020 at 5:07 PM Richard W.M. Jones <rjones at redhat.com> wrote:
> > These ones?
> > https://www.redhat.com/archives/libguestfs/2020-August/msg00078.html
> 
> No, we had a bug when copying image from glance caused sanlock timeouts
> because of the unpredictable page cache flushes.
> 
> We tried to use fadvice but it did not help. The only way to avoid such issues
> is with O_SYNC or O_DIRECT. O_SYNC is much slower but this is the path
> we took for now in this flow.

I'm interested in more background about this, because while it is true
that O_DIRECT and POSIX_FADV_DONTNEED are not exactly equivalent, I
think I've shown here that DONTNEED can be used to avoid polluting the
page cache.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list