Re: new swap cache regime

Andrea Arcangeli (andrea@e-mind.com)
Fri, 25 Sep 1998 20:05:14 +0200 (CEST)


On Fri, 25 Sep 1998, Bill Hawes wrote:

>Hi Andrea,
>
>I think your patch is a bit off the mark, as there's no need to add new
>special code to reclaim pages from the swap cache. The shrink_mmap code
>already handles it -- that's the whole point to using an inode to anchor
>the swap cache.

My code is a lazy approch, do things only when you need it. I know there
are other ways.

>All that needs to be done to handle the case of a parent forking with
>swapped out pages is (1) leave the page in the swap cache if the swap_map
>count says it's still being used, and (2) remove the message about
>freeing pages from the swap cache, as these will now become rather more
>frequent.

(3) remove the page from the swap cache after the last swap_free().

My approch is very simpler. My approch do things only when we need it. sct
should have implemented your code so it would be interesting make
performance comparison under stress and under normal use (note that under
stress you are just very slow due I/O). And as just said the idea of
leaving swap cache pages permanent came from Linus (always if I have
understood well his suggestion ;-).

Andrea[s] Arcangeli

-
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/