From patchwork Tue Feb 21 17:58:27 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: 6868 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 B4FDE23E01 for ; Tue, 21 Feb 2012 17:59:11 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8563AA184CD for ; Tue, 21 Feb 2012 17:59:11 +0000 (UTC) Received: by ghbz22 with SMTP id z22so3658597ghb.11 for ; Tue, 21 Feb 2012 09:59:11 -0800 (PST) Received: from mr.google.com ([10.50.34.202]) by 10.50.34.202 with SMTP id b10mr21369699igj.30.1329847151118 (num_hops = 1); Tue, 21 Feb 2012 09:59:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.34.202 with SMTP id b10mr17184273igj.30.1329847150753; Tue, 21 Feb 2012 09:59:10 -0800 (PST) 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.11.10 with SMTP id r10csp104278ibr; Tue, 21 Feb 2012 09:59:10 -0800 (PST) Received: by 10.68.211.202 with SMTP id ne10mr58404114pbc.164.1329847150117; Tue, 21 Feb 2012 09:59:10 -0800 (PST) Received: from e36.co.us.ibm.com (e36.co.us.ibm.com. [32.97.110.154]) by mx.google.com with ESMTPS id s4si33908072pbc.15.2012.02.21.09.59.09 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Feb 2012 09:59:10 -0800 (PST) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.154 as permitted sender) client-ip=32.97.110.154; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.154 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Feb 2012 10:59:09 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 21 Feb 2012 10:59:07 -0700 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 67E3F19D8048; Tue, 21 Feb 2012 10:59:02 -0700 (MST) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1LHwpBD033302; Tue, 21 Feb 2012 10:58:52 -0700 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 q1LHwYbH012970; Tue, 21 Feb 2012 10:58:51 -0700 Received: from paulmck-ThinkPad-W500 ([9.47.24.149]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q1LHwW7Z012630; Tue, 21 Feb 2012 10:58:33 -0700 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id E2592E4D94; Tue, 21 Feb 2012 09:58:31 -0800 (PST) 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 tip/core/rcu 2/4] rcu: Hold off RCU_FAST_NO_HZ after timer posted Date: Tue, 21 Feb 2012 09:58:27 -0800 Message-Id: <1329847110-10897-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1329847110-10897-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120221175810.GA10708@linux.vnet.ibm.com> <1329847110-10897-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12022117-3352-0000-0000-000002CB3C7F X-Gm-Message-State: ALoCoQkVpPwmPdOkJ9jWtmPjZNF2XZ2t80CAPUY6Xu+0AIPxqdHwEmmL1aePwyM3/iLevKmgZae+ From: "Paul E. McKenney" This commit handles workloads that transition quickly between idle and non-idle, and where the CPU's callbacks cannot be invoked, but where RCU does not have anything immediate for the CPU to do. Without this patch, the RCU_FAST_NO_HZ code can be invoked repeatedly on each entry to idle. The commit sets the per-CPU rcu_dyntick_holdoff variable to hold off further attempts for a tick. Reported-by: "Abou Gazala, Neven M" Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutree_plugin.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 392a651..c023464 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -2138,7 +2138,7 @@ static void rcu_prepare_for_idle(int cpu) /* Can we go dyntick-idle despite still having callbacks? */ trace_rcu_prep_idle("Dyntick with callbacks"); per_cpu(rcu_dyntick_drain, cpu) = 0; - per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1; + per_cpu(rcu_dyntick_holdoff, cpu) = jiffies; if (rcu_cpu_has_nonlazy_callbacks(cpu)) hrtimer_start(&per_cpu(rcu_idle_gp_timer, cpu), rcu_idle_gp_wait, HRTIMER_MODE_REL);