From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752678AbbLDXkp (ORCPT ); Fri, 4 Dec 2015 18:40:45 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:59086 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbbLDXko (ORCPT ); Fri, 4 Dec 2015 18:40:44 -0500 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Fri, 4 Dec 2015 15:41:25 -0800 From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com Subject: [PATCH tip/core/rcu 0/2] Enforce RCU grace-period transitivity Message-ID: <20151204234125.GA21380@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15120423-0017-0000-0000-0000101006BF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! Within RCU, acquisitions of the rcu_node structure's ->lock field must be followed by smp_mb__after_unlock_lock() in order to enforce RCU's grace-period memory-ordering guarantees. In theory, acquisitions for debug purposes need not have smp_mb__after_unlock_lock(), but in practice, anything other than fully consistent enforcement of this rule is a recipe for disaster. This series therefore adds smp_mb__after_unlock_lock() for consistency: 1. Create wrapper functions to minimize the number of these smp_mb__after_unlock_lock() calls, and apply these wrapper functions throughout. Courtesy of Peter Zijlstra. 2. Catch up wrapper-function application to patches that were in flight at the time #1 was created. Thanx, Paul ------------------------------------------------------------------------ b/kernel/rcu/tree.c | 102 ++++++++++++++++----------------------------- b/kernel/rcu/tree.h | 39 +++++++++++++++++ b/kernel/rcu/tree_plugin.h | 20 +++----- b/kernel/rcu/tree_trace.c | 2 4 files changed, 85 insertions(+), 78 deletions(-)