Another reason to distinguish anonymous vs page cache
Posted Mar 28, 2007 17:17 UTC (Wed) by liljencrantz
In reply to: Another reason to distinguish anonymous vs page cache
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.
to post comments)