LWN.net Logo

Another reason to distinguish anonymous vs page cache

Another reason to distinguish anonymous vs page cache

Posted Mar 28, 2007 17:17 UTC (Wed) by liljencrantz (subscriber, #28458)
In reply to: Another reason to distinguish anonymous vs page cache by giraffedata
Parent article: Toward improved page replacement

Sure, some programs choose to implement their own file caches internally. That is a _bad_ thing, as the operating system can share the page cache between all running software, meaning that all programs that access the same file will benefit from the cache, and that if multiple instances of the program is run, they will not create multiple copies of the same cache.

Also, you would be surprised how little it turns out that applications know about their own memory usage. The kernel is usually _much_ better at guseeing what pages will be used next based on a simple LRU rule. That is why modern processors have a really fast L1 cache instead of a tiny on-processor memory that the programmer has manual control of.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds