[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [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/ |
+-------------------------------------------------------------------+
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org