Helge Hafting wrote:> Thomas Schlichter wrote:> >> What I wanted to say is that if there is free memory it should be >> filled with>> the pages that were in use before the memory got rare. And these are >> the pages>> swapped out last.

> "What we're going to need soon" is the best. It isn't always predictable,> but sometimes. "The block following the last we read from some > file/fs-structure"> is often a good one though.

With the current setup though, the memory is wasted. It makes sense that we should fill the memory up with *something* that is likely to be useful.

If I have mozilla open, start a kernel compile, and then come back half an hour later, I would like to see the mozilla pages speculatively loaded back into memory.

Since the system is otherwise idle, it doesn't cost anything to do this. I think its obvious that it is beneficial to swap in something, the only trick is getting a decent heuristic as to what it should be.