lkml.org 
[lkml]   [2004]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ZONE_PADDING wastes 4 bytes of the new cacheline
Andrew Morton writes:
> 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.

Have you verified that? GCCs up to and including 2.95.3 and
early versions of 2.96 miscompiled the kernel when spinlocks
where empty structs on UP. I.e., you might not get a compile-time
error but runtime corruption instead.
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.112 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site