Bug 7004 - Use posix_fadvise to free cached file contents when done
Use posix_fadvise to free cached file contents when done
Status: RESOLVED WONTFIX
Product: rsync
Classification: Unclassified
Component: core
3.0.6
All Linux
: P3 enhancement
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-21 14:56 UTC by Ted Percival
Modified: 2010-11-06 11:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Percival 2009-12-21 14:56:57 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:
  http://insights.oetiker.ch/linux/fadvise.html
Comment 1 Ben Gamari 2010-11-03 07:54:13 UTC
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 [1]

[1] http://tobi.oetiker.ch/patches/rsync-3.0.7-fadvise.patch
Comment 2 Wayne Davison 2010-11-06 11:03:40 UTC
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.