Re: [2.1.130-3] Page cache DEFINATELY too persistant... feature?

Rik van Riel
1998-11-29T23:51:43Z

On Mon, 30 Nov 1998, Stephen C. Tweedie wrote:
> On 28 Nov 1998 01:31:00 -0600, ebiederm+eric@ccr.net (Eric W. Biederman)
> said:
>
> > Why does it make sense when we want memory, to write every page
> > we can to swap before we free any memory?
>
> What makes you think we do?

What makes you think think we don't? Apart from the buffer
and cache borrow percentages kswapd doesn't have any incentive
to switch back from swap_out() to shrink_mmap()...

> 2.1.130 tries to shrink cache until a shrink_mmap() pass fails.
> Then it gives the swapper a chance, swapping a batch of pages and
> unlinking them from the ptes. The pages so release still stay in
> the page cache at this point, btw, and will be picked up again from
> memory if they get referenced before the page finally gets
> discarded. We then go back to shrink_mmap(), hopefully with a
^^^^
The real question is _when_? Is it soon enough to keep the
system in a sane state?

> larger population of recyclable pages as a result of the swapout,
> and we start using that again.
>
> We only run one batch of swapouts before returning to shrink_mmap.

It's just that this batch can grow so large that it isn't
any fun and kills performance. We _do_ want to fix this...

cheers,

Rik -- hoping that this post makes my point clear...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+