Re: Unices are created equal, but ...

Linus Torvalds (torvalds@cs.helsinki.fi)
Sat, 20 Apr 1996 12:21:32 +0300 (EET DST)


On 20 Apr 1996, Gideon Glass wrote:
>
> >We should probably modify the LRU algorithm to take RSS into account (and
> >possibly access patterns, although that is harder to do). However, to be
> >quite honest, my personal priority is not that kind of behaviour, so it
> >would be up to somebody else to implement this.. (hint hint)
>
> Would something like madvise be appropriate here?

Several people have mentioned madvise, and yes, I know about it. I don't
think it's the right answer, though. We might implement madvise() _too_,
but more for other things (like judging how much read-ahead we should do
on page faults etc.

For the swap-out code I'd really prefer it if the code wouldn't rely on
user-supplied hints too much (it might take them into account, but it
shouldn't rely on them 100%).

Somebody also mentioned the paper that said that a random swapout
algorithm can be optimal, and while I can imagine doing something like
that there are problems with that approach too (the cost of walking the
page tables etc). And we really don't want to throw away the possibility
of doing swap-outs multiple pages at a time.

Linus