Re: Page allocator: Single Zone optimizations

Nick Piggin
2006-10-17T06:04:56Z

Christoph Lameter wrote:

>On Tue, 17 Oct 2006, KAMEZAWA Hiroyuki wrote:
>
>
>>How about defining following instead of inserting #ifdefs ?
>>
>>#ifdef ZONES_SHIFT > 0
>>#define zone_lowmem_reserve(z, i) ((z)->lowmem_reserve[(i)])
>>#else
>>#define zone_lowmem_reserve(z, i) (0)
>>#endif
>>
>>and removing #if's from *.c files ? Can't this be help ?
>>
>
>Well it only shifts the #ifdef elsewhere....
>

Shifting this out of the caller like this tends to be the accepted
way of doing it. It does tend to be more readable.

I would give an ack to Kame's approach for lowmem_reserve ;)

--

Send instant messages to your online friends http://au.messenger.yahoo.com