Re: [PATCH] 1/4: rework alloc_pages

Nick Piggin
2004-08-06T05:29:22Z

Andrew Morton wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
>>Previously the ->protection[] logic was broken. It was difficult to follow
>> and basically didn't use the asynch reclaim watermarks properly.
>
>
> eh?
>
> Broken how?
>

min = (1<<order) + z->protection[alloc_type];

This value is used both as the condition for waking kswapd, and
whether or not to enter synch reclaim.

What should happen is kswapd gets woken at pages_low, and synch
reclaim is started at pages_min.

> What is an "asynch reclaim watermark"?
>

pages_low and pages_high.

>
>> This one uses ->protection only for lower-zone protection, and gives the
>> allocator flexibility to add the watermarks as desired.
>
>
> eh?
>

pages_low + protection and pages_min + protection, etc.