Messages in this thread | | | Date | Thu, 21 Oct 2004 14:53:57 +1000 | From | Nick Piggin <> | Subject | Re: ZONE_PADDING wastes 4 bytes of the new cacheline |
| |
Andrew Morton wrote: > Nick Piggin <nickpiggin@yahoo.com.au> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |