Still waiting for swap prefetch
Posted Jul 26, 2007 8:41 UTC (Thu) by
tialaramex (subscriber, #21167)
In reply to:
Still waiting for swap prefetch by sitaram
Parent article:
Still waiting for swap prefetch
What you've described isn't quite the Right Thing™ though.
Eliminating swap with swapoff will force the kernel to bring back anonymous pages that had been pushed out, but not pages which are associated with existing storage, such as (almost all) program text, and mmap'd data files.
It's obviously possible to arrange for the kernel to notice that there's a lot of free RAM and a lot of pages, anonymous or otherwise that aren't in RAM and fix that. Unfortunately merely having a good idea isn't enough in Free Software, and in the kernel it's not even enough to have a good idea and an implementation.
One worry which swap prefetch people might be able to reassure me on - does it understand that if I have 2GB of as-yet unused RAM and a fresh 2GB mmap() I don't necessarily want it to try to pull all those pages off disk? ie does it know the difference between pages that have been pushed out and those which were simply never needed yet?
(
Log in to post comments)