From: Peter Zijlstra <peterz@infradead.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "Paul McKenney" <paulmck@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
jiangshanlai@gmail.com, dipankar@in.ibm.com,
"Andrew Morton" <akpm@linux-foundation.org>,
"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
"Josh Triplett" <josh@joshtriplett.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Steven Rostedt" <rostedt@goodmis.org>,
"David Howells" <dhowells@redhat.com>,
dvhart@linux.intel.com,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
oleg@redhat.com, "pranith kumar" <bobby.prani@gmail.com>
Subject: Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for rcu_head two-byte alignment
Date: Mon, 22 Aug 2016 20:56:09 +0200 [thread overview]
Message-ID: <20160822185609.GK10153@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CANn89iK6Py01r0nWYB75_RgXPSmZ_jPLeBYZ1q1uwf_e9HNZ4A@mail.gmail.com>
On Mon, Aug 22, 2016 at 11:48:53AM -0700, Eric Dumazet wrote:
> On Mon, Aug 22, 2016 at 10:34 AM, Paul E. McKenney
> <paulmck@linux.vnet.ibm.com> wrote:
>
> > That does have much to say for itself, though I would prefer sizeof(void
> > *) to sizeof(unsigned long). But would it make sense to define a mask
> > on a per-architecture basis, with the default being (sizeof(void *) - 1)?
> > Then maybe an IMPROPERLY_ALIGNED_POINTER():
> >
> > #ifndef CONFIG_ARCH_POINTER_ALIGNMENT
> > #define CONFIG_ARCH_POINTER_ALIGNMENT (sizeof(void *) - 1)
> > #endif
> >
> > #define IMPROPERLY_ALIGNED_POINTER(p) \
> > ((p) & CONFIG_ARCH_POINTER_ALIGNMENT)
> >
> > m68k would define ARCH_POINTER_ALIGNMENT to 1, and all other arches
> > would leave it undefined.
> >
> > Then __call_rcu() could to this:
> >
> > WARN_ON_ONCE(IMPROPERLY_ALIGNED_POINTER(head));
>
> Don't we have __alignof__(void *) to avoid #ifdef CONFIG_M68K and
> other new macros ?
Yes, but that 'hides' the m68k funny, while doing an explicit #ifdef has
documentation value... but I don't care too deeply.
next prev parent reply other threads:[~2016-08-22 18:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 15:14 [PATCH tip/core/rcu 0/2] Documentation updates Paul E. McKenney
2016-08-22 15:14 ` [PATCH tip/core/rcu 1/2] rcutorture: Remove outdated config option description Paul E. McKenney
2016-08-22 15:14 ` [PATCH tip/core/rcu 2/2] documentation: Record reason for rcu_head two-byte alignment Paul E. McKenney
2016-08-22 16:25 ` Peter Zijlstra
2016-08-22 17:34 ` Paul E. McKenney
2016-08-22 18:48 ` Eric Dumazet
2016-08-22 18:56 ` Peter Zijlstra [this message]
2016-08-22 19:18 ` Steven Rostedt
2016-08-22 19:54 ` Paul E. McKenney
2016-08-22 20:48 ` Geert Uytterhoeven
2016-08-22 21:16 ` Paul E. McKenney
2016-08-23 6:39 ` Geert Uytterhoeven
2016-08-23 13:43 ` Paul E. McKenney
2016-08-23 13:45 ` Geert Uytterhoeven
2016-08-23 14:23 ` Paul E. McKenney
2016-08-23 14:30 ` Geert Uytterhoeven
2016-08-23 14:41 ` Paul E. McKenney
2016-08-24 18:03 ` Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160822185609.GK10153@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox