Hi, see the problem described in $URL. Think about a situation where you backup your servers everyday using rsync. With a vanilla rsync your system's page cache would be filled up with data you don't use and the data you really care of will be 'blown' away. With the patch (http://tobi.oetiker.ch/patches/rsync-3.0.9-3-fadvise.patch - latest version from 16.01.2013) you can specify an option "--drop-cache" to advise your kernel not to cache the data you don't care of, so that the data you care of will be kept in cache. Could be done by providing a useflag "fadvise". Reproducible: Always
"The new rsync functionality has been contributed to the rsync mainline and will appears in the patch directory of the rsync source archive along with the next version of rsync." However, upstream says: "I don't feel this patch is general enough nor straight-forward enough to make it into rsync. It would be better for someone to write a a pre-load library that could be used with any copy program rather than putting this into rsync."
i tend to agree with upstream. in some niche cases, this patch certainly makes sense (although i think the chosen flag name is terrible), but a different implementation (say via LD_PRELOAD) would be better. for example, overriding the read() and write() funcs and doing posix_fadvise on them automatically. the coding style in the patch also leaves a bit to be desired which tends to be an indicator of "this might not be the greatest code to ship". and i don't really want to be the one to clean up/maintain it. the good news is that rsync supports epatch_user, so it should be easy for you to add the patch to your own system in /etc/portage/patches/.
Just for reference, since I only now found it myself: one possible implementation of the LD_PRELOAD way of doing things can be found at https://github.com/Feh/nocache