The Samba-Bugzilla – Bug 7004
Use posix_fadvise to free cached file contents when done
Last modified: 2010-11-06 11:03:40 UTC
It would be good if rsync used posix_fadvise with POSIX_FADV_DONTNEED to notify the kernel when it no longer needs file contents that have been synced to prevent useful cache contents being dropped in favor of never-reused rsynced files.
Tobias Oetiker wrote a patch & documentation about this:
What is the status of this? Grepping the source for fadvise turns up nothing. It seems the patch has even been ported up to 3.0.7 
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.