Howard Chu wrote:As implied by this post http://lkml.indiana.edu/hypermail/linux/kernel/0701.3/0354.html setting swappiness to 0 seems to give the desired effect of preventing mapped pages from being reclaimed. If this is an intended effect, it would be nice to have this documented in Documentation/sysctl/vm.txt. If this is not the intended effect, please don't "fix" this without providing a supported means of doing the same.2 questions:
why is there data in the FS cache that isn't owned by (the mmap of) the
process that caused it to be paged in in the first place?
is there a tunable knob to discourage the page cache from stealing from the
process?
This Unmapped page cache control http://lwn.net/Articles/436010/ sounds like
it might have been helpful here. I.e., having a way to prioritize so that
unmapped cache pages get reclaimed in preference to mapped pages could help.
Though I still don't understand why these pages in the cache aren't mapped in
the first place.