public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org,
	dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com,
	fweisbec@gmail.com, oleg@redhat.com, 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 18:25:53 +0200	[thread overview]
Message-ID: <20160822162553.GJ10153@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1471878883-6660-2-git-send-email-paulmck@linux.vnet.ibm.com>

On Mon, Aug 22, 2016 at 08:14:43AM -0700, Paul E. McKenney wrote:
> The __call_rcu() assertion that checks only the bottom bit of the
> rcu_head pointer is a bit counter-intuitive in these days of ubiquitous
> 64-bit systems.  This commit therefore records the reason for this
> odd alignment check, namely that m68k guarantees only two-byte alignment
> despite being a 32-bit architectures.

Would not something like:

#ifdef CONFIG_M68K
	/*
	 * m68k is weird and doesn't have naturally aligned types.
	 */
	WARN_ON_ONCE((unsigned long)head & 1);
#else
	WARN_ON_ONCE((unsigned long)head & (sizeof(unsigned long) - 1));
#endif

Be better?

  reply	other threads:[~2016-08-22 16:26 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 [this message]
2016-08-22 17:34     ` Paul E. McKenney
2016-08-22 18:48       ` Eric Dumazet
2016-08-22 18:56         ` Peter Zijlstra
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=20160822162553.GJ10153@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