fadvise DONTNEED implementation (or lack thereof)
wayned at samba.org
Sat Nov 6 10:23:49 MDT 2010
On Wed, Nov 3, 2010 at 10:58 PM, Ben Gamari <bgamari.foss at gmail.com> wrote:
> It looks like a few folks have discussed addressing the issue in the past,
> but nothing has happened as of 2.6.36.
Yeah, the linux code for this has long been buggy and near useless. What is
really needed is a way for some file access to be marked as generating
low-priority cache data into the filesystem cache. Such a flag should only
apply to newly cached data, so that copying a file that was cached by some
other program would not lower its cache priority (nor kick it out of the
cache). If some other process comes along and reads from the low-priority
cache with a normal-priority read, it should get upgraded to normal
priority. Something like that seems pretty simple and useful.
As for rsync, all current implementations of cache dropping are way too
klugey to go into rsync. I'd personally suggest that someone create a
linux-specific pre-load library that overrides read() and write() calls and
use that when running rsync (or whatever else) to implement the extreme
weirdness that is currently needed for cache twiddling.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync