Re: An idea for prefetching swapped memory...

Mark Mielke (mark@mark.mielke.cc)
Mon, 7 Apr 2003 14:37:00 -0400


On Mon, Apr 07, 2003 at 10:19:25AM -0400, Chris Friesen wrote:
> Helge Hafting wrote:
> >"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.

Chris: Based on your usage patterns, how would Linux know that you were
going to be opening up Mozilla, and not that you were going to tweak the
kernel source and compile it again?

The only time memory is wasted is when you don't have enough of it, and it
gets trampled for common operations that you perform. All other times, the
memory is loaded, because it was used, which means it might be used again.

mark

-- 
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...

http://mark.mielke.cc/

- 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/