Re: ZONE_PADDING wastes 4 bytes of the new cacheline

From: Andrew Morton
Date: Wed Oct 20 2004 - 23:57:31 EST


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

-
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/