Re: Page allocator: Single Zone optimizations

KAMEZAWA Hiroyuki
2006-10-17T01:27:37Z

On Mon, 16 Oct 2006 17:50:26 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> +#if ZONES_SHIFT > 0
> seq_printf(m,
> "\n protection: (%lu",
> zone->lowmem_reserve[0]);
> @@ -563,6 +563,7 @@ static int zoneinfo_show(struct seq_file
> seq_printf(m,
> ")"
> "\n pagesets");
> +#endif

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 ?

-Kame