Subject: Re: [RCU PATCH 06/14] net: sched: fw use RCU

From: "Paul E. McKenney" <[email-masked]>
Date: Fri, 14 Mar 2014 11:50:05 -0700

On Fri, Mar 14, 2014 at 08:38:10AM -0700, Paul E. McKenney wrote:
> On Fri, Mar 14, 2014 at 06:46:38AM -0700, Eric Dumazet wrote:
> > On Fri, 2014-03-14 at 06:28 -0700, Paul E. McKenney wrote:
> > 
> > > Now I just need to figure out why it -causes- a BUILD_BUG_ON for the
> > > cris and m68k architectures in Fengguang Wu's testing...
> > 
> > Right, they don't necessarily align pointers ;)
> > 
> > alignof(void *) ?
> 
> It complained about the size rather than the alignment, but it would
> certainly make sense to constrain the rcu_head structure's alignment,
> now that you mention it.  I will do that and see if it helps.  ;-)
> 
> Thank you for the tip!

And you were quite right...  When the alignment is bad, it complains
about the size.  And although I can specify that struct rcu_head be
aligned, but __attribute__(packed) overrides this when specified on an
enclosing structure.  As does the -fpack-struct gcc command-line option.

Other thoughts on getting around this problem?

Hmmm...  Maybe if cris and m68k guaranteed to keep functions out of the
bottom four pages of memory...

							Thanx, Paul