Re: shrink_mmap() change in ac-21

Rik van Riel
2000-06-20T16:18:38Z

On Tue, 20 Jun 2000, Andrea Arcangeli wrote:
> On Mon, 19 Jun 2000, Jamie Lokier wrote:
>
> >if those wrong zones are quite full. If the DMA zone desparately needs
> >free pages and keeps needing them, isn't it good to encourage future
> >non-DMA allocations to use another zone? Removing pages from other
>
> After some time the DMA zone will be full again anyway and you
> payed a cost that consists in throwing away unrelated innocent
> pages. I'm not convinced it's the right thing to do.

I didn't know for sure either until I tested -ac21 on my
192MB workstation. The bursts kswapd went through when
it was freeing DMA memory (and 8MB of other memory) have
convinced me that this is not a good idea.

Also, since kswapd stops when all zones have free_pages
above pages_low and we'll free up to pages_high pages of
one zone, it means that we'll:

- allocate the next series of pages from that one zone
with tons of unused pages
- wake up kswapd so we'll free the *next* unused pages
from that zone when we run out of the current batch
- rinse and repeat

This means we'll do a *lot* more allocations from the
less loaded zones than from the other zone, with a few
(short) interruptions by kswapd. Also, there's no need
to throw away data early.

Of course, once we have a scavenge list (in the active
inactive scavenge list VM) this whole point will be moot
and we just want to avoid doing too much IO at once).

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/