Another reason to distinguish anonymous vs page cache
Posted Mar 23, 2007 20:15 UTC (Fri) by
giraffedata (subscriber, #1954)
Parent article:
Toward improved page replacement
The article mentions one reason to favor page cache pages over anonymous ones: that a page cache page is more likely to exist somewhere else already so stealing the page frame doesn't require writing out the page presently in it.
There's another reason that I think is even more important: programs have traditionally been written to assume that I/O is slow and memory access is fast. It's an idea that is perhaps outdated in the face of modern virtual memory and file caching, not to mention mmap, but still a program that reads something from a file and thinks it will access it again soon is likely to keep it in an anonymous virtual memory buffer. Sophisticated programs even "page" between virtual memory and a file based on the program's knowledge of what will be needed soonest.
So giving priority to anonymous pages, which back virtual memory, is a way to take advantage of extra information the program has about what data is most important.
(
Log in to post comments)