Re: [PATCH] 1/4: rework alloc_pages

Nick Piggin
2004-08-06T05:12:02Z

Nick Piggin wrote:
> Here are a few of the more harmless mm patches I have been sitting on
> for a while. They've had some testing in my tree (which does get used
> by a handful of people).
>
>
> ------------------------------------------------------------------------
>
>
> This reworks alloc_pages a bit.
>
> Previously the ->protection[] logic was broken. It was difficult to follow
> and basically didn't use the asynch reclaim watermarks properly.
>
> This one uses ->protection only for lower-zone protection, and gives the
> allocator flexibility to add the watermarks as desired.
>

Note that this patch strictly enforces the lower zone protection (which is
currently disabled anyway) instead of allowing GFP_ATOMIC allocations to
get at them.

It also does a few minor things like not taking rt_task into account during
the first loop (because the kswapd reclaim watermarks shouldn't depend on
that), and also only checking rt_task if !in_interrupt.

The biggest thing it does is use the kswapd watermarks correctly - and I've
generally observed lower allocstall, and kswapd being more productive.