Re: [PATCH] swap usage of high memory (fwd)

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Jul 19 2001 - 11:46:28 EST


On Thu, 19 Jul 2001, Rik van Riel wrote:
>
> On Wed, 18 Jul 2001, Marcelo Tosatti wrote:
>
> > Still able to trigger the problem with the GFP_HIGHUSER patch applied.
>
> Hrrm, maybe the fact that the free target in the DMA zone is
> four times higher than in the other zones has something to do
> with the unbalance...

No, the free target is higher for the DMA zone just to make the small zone
not deplete as easily. It might make the problem slightly easier to
trigger, but I think the bassic problem is real - some zones inherently
have higher pressure on them, and those zones do need to be aged faster.

Note that most people don't see this very much, because there are happily
not that many cases where the 16MB DMA limit matters any more. These days
you're more likely to start seeing the NORMAL vs HIGHMEM zone issues,
where the NORMAL zone just automatically has more pressure because a lot
of things like the icache/dcache can only be allocated from there.

Note that the unfair aging (apart from just being a natural requirement of
higher allocation pressure) actually has some other advantages too: it
ends up being aload balancing thing. Sure, it might throw out some things
that get "unfairly" treated, but once we bring them in again we have a
better chance of bringing them into a zone that _isn't_ under pressure.

So unfair eviction can actually end up being a natural solution to
different memory pressure too (it obviously only works if the memory
pressure isn't _too_ one-sided - if the great majority of allocations all
_have_ to be to the pressure zone, the other zones obviously have no way
to accept any of the extra pressure regardless of how hard they'd try).

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:12 EST