Re: Linux-2.4.1-pre11

Rik van Riel
2001-01-29T21:22:29Z

On Mon, 29 Jan 2001, Marcelo Tosatti wrote:

> Btw, look at this part of code from kswapd:
>
> * 1) we need no more free pages or
> * 2) the inactive pages need to be flushed to disk,
> * it wouldn't help to eat CPU time now ...

> if (!free_shortage() || !inactive_shortage()) {
> interruptible_sleep_on_timeout(&kswapd_wait, HZ);
>
> kswapd goes to sleep if there is no free shortage, even if the
> inactive list is under shortage.
>
> Why not refill the inactive list when the inactive list is under
> shortage? :)

At this point, we already scanned the active list and we
know we're not getting any more aging information at this
point.

In this case, it might be better to leave the active pages
alone for a while and give userland a chance to use the
pages so we can get some aging information the next time we
scan the list.

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/