Messages in this thread | | | Date | Mon, 7 Apr 2003 16:39:11 +0200 | From | Jörn Engel <> | Subject | Re: An idea for prefetching swapped memory... |
| |
On Mon, 7 April 2003 10:19:25 -0400, Chris Friesen wrote: > > 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.
In the scenario above, it costs you a lot. The memory is completely used, else mozilla wouldn't get swapped out. If you swap it back in and get rid of fs cache, the next kernel (compile|grep|whatever) will be slower.
And even in the original scenario, it will be expensive, depending on your machine. On a notebook, it costs you battery power, which is a limited resource, *for sure*. You *may* save user time, which *may* be a limited resource, but not always.
But sure, it is a fun project to hack on, just go ahead and show the numbers. :)
> 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.
And when it should be done. ;)
Jörn
-- There's nothing better for promoting creativity in a medium than making an audience feel "Hmm I could do better than that!" -- Douglas Adams in a slashdot interview - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |