lkml.org 
[lkml]   [2001]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: swapin readahead pre-patch (what about the code?)
Date
Marcelo Tosatti writes:
> The following patch does this, and it also changes the readahead code to
> readaround. I'm not sure if readaround is better than readahead for the
> swapin case, and I'll have to test this more to make sure.

No comment on the code itself, but in general I would think that swapin
is relatively non-deterministic, unlike reading from a file which is often
sequential. Even if a program is swapped out linearly to the swap space,
it may well be that the working set is a bunch discontiguous pages, so
readahead of any sort may be a net loss. This is especially true with
swapin, because you need to evict another page to pre-read a swap page.

I suppose we need to find a good benchmark for a system under swap load
and test the current readahead, your new code, and no swap read-ahead at all.

I suppose the other area to look at is how pages are layed out when
they are swapped to disk. If you go from medium memory pressure (where
unused pages have been swapped already) to thrashing, then if you can
put the remaining pages of each program to swap contiguously, then swap
read-ahead will be a net win, because you are likely to need all of them
again to run the program.

Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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