From patchwork Tue Oct 30 16:54:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12600 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 88D8723FBD for ; Tue, 30 Oct 2012 16:54:52 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3457EA188A5 for ; Tue, 30 Oct 2012 16:54:52 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so695891iej.11 for ; Tue, 30 Oct 2012 09:54:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=gtMeDGTVCK/JWTuWOgX7PEQr81YUJSXs7YWm+Hmpu2Y=; b=AJXrsBr8dKlQTrscieLDvd438lZyrfx+pANI1CONDWm0nNC1i4ITSfZ1LrZJES5X3U 8SXNc8Jxj11NtFWs4nKQuwJ3aqejje21A0mAq2fNvbT7YzoBqRSPxUY16ubHlDIm5cdZ Z7RHREVdRoTRdBrpJsULdR/bPb4C+fwMwAxq5psY1vfvRnkW8aHSbe5586jZ0JVS8MBY om8Ym8Li6dSa3S4Cb73oLQudXrfivlTdqk65jaSdk92K2m9bx+hOLUT4jDtRpCSRTO2k 4xl8uJ7FTYTwydMXslcO6UirkW9kjHtICFm+mU4ulBcGjdAjFxUk3sAYBvbgJNmomGW7 0JHg== Received: by 10.50.140.97 with SMTP id rf1mr2052846igb.70.1351616091944; Tue, 30 Oct 2012 09:54:51 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp449823igt; Tue, 30 Oct 2012 09:54:51 -0700 (PDT) Received: by 10.50.87.227 with SMTP id bb3mr2155912igb.15.1351616091576; Tue, 30 Oct 2012 09:54:51 -0700 (PDT) Received: from e9.ny.us.ibm.com (e9.ny.us.ibm.com. [32.97.182.139]) by mx.google.com with ESMTPS id va13si9923542igb.28.2012.10.30.09.54.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 09:54:51 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.139 as permitted sender) client-ip=32.97.182.139; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.139 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2012 12:54:50 -0400 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e9.ny.us.ibm.com (192.168.1.109) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Oct 2012 12:54:48 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 9581238C809B; Tue, 30 Oct 2012 12:54:47 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9UGskAc273380; Tue, 30 Oct 2012 12:54:46 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9UGsdiJ028354; Tue, 30 Oct 2012 10:54:41 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-65-77-17.mts.ibm.com [9.65.77.17]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9UGsbZT028143; Tue, 30 Oct 2012 10:54:38 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 88045EBE99; Tue, 30 Oct 2012 09:54:37 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, edumazet@google.com, darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 1/7] rcu: Fix comment about _rcu_barrier()/orphanage exclusion Date: Tue, 30 Oct 2012 09:54:30 -0700 Message-Id: <1351616076-25617-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <20121030165415.GA25438@linux.vnet.ibm.com> References: <20121030165415.GA25438@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12103016-7182-0000-0000-000002FDB499 X-Gm-Message-State: ALoCoQmkKaiJkvgJB8GrvIqvgglHgv5EmHNd/ZDwommQDJ0iXeJRz/FjOBHP8xBt2LsZKgwieUfA From: "Paul E. McKenney" In the old days, _rcu_barrier() acquired ->onofflock to exclude rcu_send_cbs_to_orphanage(), which allowed the latter to avoid memory barriers in callback handling. However, _rcu_barrier() recently started doing get_online_cpus() to lock out CPU-hotplug operations entirely, which means that the comment in rcu_send_cbs_to_orphanage() that talks about ->onofflock is now obsolete. This commit therefore fixes the comment. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutree.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 74df86b..ac8aed8 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -1581,8 +1581,8 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, { /* * Orphan the callbacks. First adjust the counts. This is safe - * because ->onofflock excludes _rcu_barrier()'s adoption of - * the callbacks, thus no memory barrier is required. + * because _rcu_barrier() excludes CPU-hotplug operations, so it + * cannot be running now. Thus no memory barrier is required. */ if (rdp->nxtlist != NULL) { rsp->qlen_lazy += rdp->qlen_lazy;