Open textshell opened 4 years ago
I somehow can't find the minimum kernel version required for this feature.
Also, besides kernel, are there other requirements?
from https://man7.org/linux/man-pages/man2/readv.2.html
preadv2() and pwritev2() first appeared in Linux 4.6. Library support was added in glibc 2.26.
@infectormp ok, that's informative about the syscalls, but the man pages do not list the minimum requirement for the RWF_UNCACHED
flag.
@ThomasWaldmann look like RWF_UNCACHED
flag was introduced in kenel 5.5
I tried to find that in official kernel changelog, but couldn't.
hmm... i check latest kernel source and do not find any string with RWF_UNCACHED
. So look like this work unfinished yet.
Yet another work that can help speedup walk through files https://lwn.net/Articles/843163/
@infectormp no sure i understand, how could borg use that?
@ThomasWaldmann Sorry, I don't know how borg can use this. This is just for information, maybe someone can find how to use it in the future.
There are patches in flight for the linux kernel to add an additional mechanism to allow file IO without affecting file caches. The proposal uses a new flag RWF_UNCACHED for the preadv2 and pwritev2 system calls to activate this mode. Possibly this could be interesting for borg to use instead of POSIX_FADV_DONTNEED.
Points to consider: Does using this for reading make sense even if this disables read-ahead? If missing read ahead is a problem would a reader thread help?
See https://lwn.net/Articles/806980/ for details about the inflight patches.