lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: An idea for prefetching swapped memory...
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.094 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site