Re: lowmem_reserve (replaces protection)

From: Andrew Morton
Date: Wed Oct 27 2004 - 00:42:03 EST


Andrea Arcangeli <andrea@xxxxxxxxxx> wrote:
>
> So after allocating the highmem pages we invoke kswapd
> again

Nope. We don't wake kswapd until the lower zones are below pages_low as
well. Then we rebalance all the zones which are below pages_high.

As I say: run a workload mix and monitor /proc/vmstat:

pgscan_kswapd_high
pgscan_kswapd_normal
pgscan_kswapd_dma

These should be increasing at rates which are proportional to their size,
if most allocations have __GFP_HIGHMEM.

The lower-zone protection thing means that the scanning rate really should
be proportional to (zone size - (protection from __GFP_HIGHMEM
allocations)), but it's not too far off at present.

The balancing of the zone scanning rates is subtle and easy to break. As is
the balancing of that against slab scanning.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/