On Sat, 03 Mar 2007 19:01:01 -0500 Rik van Riel <riel@xxxxxxxxxx> wrote:
The use-once policy we have in the kernel should work
perfectly fine for backups. All we need to do is
actually honor the accessed bit on active page cache
pages, instead of flushing them onto the inactive
list.
What am I overlooking?
That'll improve backups but will break other things.
To do this effectively we'd need to change the policy so that new pagecache
allocations cause no scanning of used-twice pages at all. So that even
after many gigs of backing up, the working set is still there.
Problem is, (for example) what about the person who has 80% of memory in
used-twice state and who then reads a file or files which are 20% or more of
the size of memory, two or more times. It'll be 100% cache misses, every time.
This will happen quite a lot. IOW, once those pages are in used-twice state,
how does further pagecache activity ever get them _out_ of that state? Only
by joining the used-twice page set, and that can't happen if the used-once-so-far
pages got reclaimed.
Doing a refault thing would help a bit, but stops working at a certain point.