lkml.org 
[lkml]   [1998]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] swapin readahead and fixes
On Mon, 7 Dec 1998, Billy Harvey wrote:
> Rik van Riel wrote:
> >
> > On Mon, 7 Dec 1998, Billy Harvey wrote:
> >
> > > Has anyone ever looked at the following concept? In addition to a
> > > swap-in read-ahead, have a swap-out write-ahead. The idea is to use
> > > all the avaialble swap space as a mirror of memory.
> >
> > We do something a bit like this in 2.1.130+. Writing out all
> > pages to swap will use far too much I/O bandwidth though, so
> > we will never do that...
>
> That's my point though about not taking I/O time away from other
> tasks. Only mirror pages to swap if there's nothing else blocked
> for I/O - put any free time to work, and mirror pages if swap memory
> allows in anticipation that it may be swapped out later.

Write-ahead only makes sense when we can cluster the extra
I/O with the operation we were already going to do.

> I suppose a least-recently-used approach on the pages would have the
> highest payback.

LRU would be a very bad strategy since it wastes too much CPU
and it prevents us from writing the blocks to disk in such a
way that it makes swapin readahead efficient.

Remember that disk seek time is about 10 times as expensive
as transfer time. This means that we've got to optimize our
I/O patterns mainly for seek time -- transferring a few
blocks extra in one big I/O sweep isn't really costing us
anything. And once we do that, expensive schemes like LRU
really don't matter any more, do they?

regards,

Rik -- the flu hits, the flu hits, the flu hits -- MORE
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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