From patchwork Fri Jun 8 04:26:48 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: 9170 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 E5D1C23F0F for ; Fri, 8 Jun 2012 04:27:09 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id B50C8A1804B for ; Fri, 8 Jun 2012 04:27:09 +0000 (UTC) Received: by yhpp61 with SMTP id p61so1088068yhp.11 for ; Thu, 07 Jun 2012 21:27:09 -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=ywF89hAfF23CR9Ae5bqMZXahyrF5OAsMse7p0hF96k0=; b=DXqBAupsrHyQaO1lxL6kAGBjZQr65/mhJ3/9e71o9bTHUlpjM0FcgiybiCJhCyaoZp pQIo+Vq1xC9vpBivdNkzEt4/NtBAubGLeGmwP9Pgbw7Tv9EcbP1mn1HpEJgWo/3YsJKk 4TgqVnXi4Z73if04bfpmACyU04XO9f5RefORxf/gnFlhBi6FlsMIG/x9q6yHZFp1dyyh 8xR/0JWi515GPmNr83ZLHNepicV9QMFYWxpGYOJAdueMTNmkoMu+kNujyqGJa+lwc9zr 3yE7yoBjSG1FtAa3gkFmaWGtEKK7CqRpFfy0hBtkD5z761gRSKZr0aY0qQMXWQRfhGGM +66g== Received: by 10.42.89.72 with SMTP id f8mr2826706icm.33.1339129629167; Thu, 07 Jun 2012 21:27:09 -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.231.24.148 with SMTP id v20csp14724ibb; Thu, 7 Jun 2012 21:27:08 -0700 (PDT) Received: by 10.101.137.39 with SMTP id p39mr1479391ann.73.1339129627318; Thu, 07 Jun 2012 21:27:07 -0700 (PDT) Received: from e37.co.us.ibm.com (e37.co.us.ibm.com. [32.97.110.158]) by mx.google.com with ESMTPS id g9si2169253ani.123.2012.06.07.21.27.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jun 2012 21:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.158 as permitted sender) client-ip=32.97.110.158; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.158 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jun 2012 22:27:06 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 7 Jun 2012 22:27:02 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 6CE7E1FF0023; Fri, 8 Jun 2012 04:27:01 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q584R1IN225214; Thu, 7 Jun 2012 22:27:01 -0600 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 q584QwHv006549; Thu, 7 Jun 2012 22:27:00 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-65-78-192.mts.ibm.com [9.65.78.192]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q584Qvkc006533; Thu, 7 Jun 2012 22:26:58 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 2EFE1E4D9D; Thu, 7 Jun 2012 21:26:57 -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, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH rcu 1/8] rcu: RCU_FAST_NO_HZ detection of callback adoption Date: Thu, 7 Jun 2012 21:26:48 -0700 Message-Id: <1339129615-1795-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <20120608042632.GA1250@linux.vnet.ibm.com> References: <20120608042632.GA1250@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12060804-7408-0000-0000-000005ADF986 X-Gm-Message-State: ALoCoQl9X62OkAv6Zy0w2YfXEPExlX9u5AExzoSfldxQxc0XLIwV/0Ru/e+fYDbkv0U5Ro548dSB From: "Paul E. McKenney" In the present implementations of CPU hotplug, the outgoing CPU is guaranteed to run its stop-machine process on the way out, which will guarantee that RCU_FAST_NO_HZ forces the CPU out of dyntick-idle mode. However, new versions of CPU hotplug might not work this way. This commit therefore removes this design constraint by explicitly notifying CPUs when they adopt non-lazy RCU callbacks. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney Tested-by: Heiko Carstens Tested-by: Pascal Chapperon --- kernel/rcutree.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 0da7b88..3b0f133 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -1397,6 +1397,8 @@ static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) rdp->qlen_lazy += rsp->qlen_lazy; rdp->qlen += rsp->qlen; rdp->n_cbs_adopted += rsp->qlen; + if (rsp->qlen_lazy != rsp->qlen) + rcu_idle_count_callbacks_posted(); rsp->qlen_lazy = 0; rsp->qlen = 0;