Re: ZONE_PADDING wastes 4 bytes of the new cacheline
From: Nick Piggin
Date: Thu Oct 21 2004 - 00:08:43 EST
Andrew Morton wrote:
Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
#if defined(CONFIG_SMP)
> struct zone_padding {
> - int x;
> } ____cacheline_maxaligned_in_smp;
> #define ZONE_PADDING(name) struct zone_padding name;
> #else
Perhaps to keep old compilers working? Not sure.
gcc-2.95 is OK with it.
Stock 2.6.9:
sizeof(struct zone) = 1920
With Andrea's patch:
sizeof(struct zone) = 1536
With ZONE_PADDING removed:
sizeof(struct zone) = 1408
Wow. You'd probably still want pad1 because that seperates the
allocator and the scanner. It looks like temp/prev_priority
should be _above_ pad2, and possibly free_area should be above
pad1.
Don't know about all the stuff below pad3.
-
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/