[Libguestfs] [PATCH libnbd 0/2] copy: Preserve the host page cache when reading local files.

Richard W.M. Jones rjones at redhat.com
Tue Feb 23 17:28:11 UTC 2021


In nbdcopy we can preserve the page cache while reading from local
files.  This means (unlike O_DIRECT) using the page cache to our
advantage when a file is already present in memory.  But also not
increasing the amount of file which is cached as we read it, or at
least, not by very much.

These two patches are an evolution of this patch:
https://listman.redhat.com/archives/libguestfs/2021-February/thread.html#00036

Although the code is heavily conditional and so will only work on 64
bit Linux systems, I didn't bother adding a command line flag because
I feel the way this is written (modulo bugs) it should almost always
be advantageous.

Writes next -- but that's much more difficult.

Rich.





More information about the Libguestfs mailing list