From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755983AbcHVQ0L (ORCPT ); Mon, 22 Aug 2016 12:26:11 -0400 Received: from merlin.infradead.org ([205.233.59.134]:42794 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755561AbcHVQ0J (ORCPT ); Mon, 22 Aug 2016 12:26:09 -0400 Date: Mon, 22 Aug 2016 18:25:53 +0200 From: Peter Zijlstra To: "Paul E. McKenney" 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 Message-ID: <20160822162553.GJ10153@twins.programming.kicks-ass.net> References: <20160822151413.GA6337@linux.vnet.ibm.com> <1471878883-6660-2-git-send-email-paulmck@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471878883-6660-2-git-send-email-paulmck@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?