From patchwork Fri Jun 8 04:26:49 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: 9172 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 CBF0723F0F for ; Fri, 8 Jun 2012 04:27:29 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 848BEA186F6 for ; Fri, 8 Jun 2012 04:27:29 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1082519ggn.11 for ; Thu, 07 Jun 2012 21:27:29 -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=DwaIVAYuFKQcsb8JVl8yl+E+ES1GeH4GAJbr3Eb64h0=; b=QwYS6MpFXPsSXlLNwzO/wNJMnoaPWPzdDweppd8nLTHqgjmMc7aHFH7LqV8Nj20N4W rJ+OHa1Cp9fOpfxdoaunPloylobKTs+tbuGbliGXXcdUiMOgbDFy65iiykwnZQZHosh+ cIx4Xy0uvJYL/+fEwPGYj+ZsLXDT2JaHuD+BgCibRRTlJUVw2bNX6p2xi7fKMUVOw3fb cgm75uygbGQT3iGxMx4ZFB9HOo8JeTpC9FtSLMS7R6O0Mlff+xcItbXV2iI3Yxy+JGFK 74rsmjF70/zblF1WPIBc8tC2JyZnIxPjhseVJdgIlg6W0LUTm9XVhU7EYDQ39GpZY1pj I5aw== Received: by 10.42.210.193 with SMTP id gl1mr77525icb.57.1339129648790; Thu, 07 Jun 2012 21:27:28 -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 v20csp14743ibb; Thu, 7 Jun 2012 21:27:28 -0700 (PDT) Received: by 10.68.226.193 with SMTP id ru1mr495075pbc.79.1339129648129; Thu, 07 Jun 2012 21:27:28 -0700 (PDT) Received: from e36.co.us.ibm.com (e36.co.us.ibm.com. [32.97.110.154]) by mx.google.com with ESMTPS id pu10si8805604pbb.59.2012.06.07.21.27.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jun 2012 21:27:28 -0700 (PDT) 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 ; Thu, 7 Jun 2012 22:27:27 -0600 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; Thu, 7 Jun 2012 22:27:01 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 15DEE19D805E; Fri, 8 Jun 2012 04:27:00 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q584R0ZB195546; Thu, 7 Jun 2012 22:27:00 -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 q584Qwpx006552; 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 q584Qvfp006535; Thu, 7 Jun 2012 22:26:58 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 3CBCFE4D98; 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 2/8] rcu: Update RCU_FAST_NO_HZ tracing for lazy callbacks Date: Thu, 7 Jun 2012 21:26:49 -0700 Message-Id: <1339129615-1795-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1339129615-1795-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120608042632.GA1250@linux.vnet.ibm.com> <1339129615-1795-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12060804-7606-0000-0000-000000F4D9FC X-Gm-Message-State: ALoCoQl1VmT5RE+ohZ0SrnUQ6CJ/stM3MJudpRcofWmsG5GrZQzBNrHKCX2kVBYYejQJr0CusoJG From: "Paul E. McKenney" In the current code, a short dyntick-idle interval (where there is at least one non-lazy callback on the CPU) and a long dyntick-idle interval (where there are only lazy callbacks on the CPU) are traced identically, which can be less than helpful. This commit therefore emits different event traces in these two cases. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney Tested-by: Heiko Carstens Tested-by: Pascal Chapperon --- include/trace/events/rcu.h | 1 + kernel/rcutree_plugin.h | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 1480900..d274734 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h @@ -289,6 +289,7 @@ TRACE_EVENT(rcu_dyntick, * "In holdoff": Nothing to do, holding off after unsuccessful attempt. * "Begin holdoff": Attempt failed, don't retry until next jiffy. * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. + * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. * "More callbacks": Still more callbacks, try again to clear them out. * "Callbacks drained": All callbacks processed, off to dyntick idle! * "Timer": Timer fired to cause CPU to continue processing callbacks. diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 2411000..5449f02 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -2165,15 +2165,17 @@ static void rcu_prepare_for_idle(int cpu) !rcu_pending(cpu) && !local_softirq_pending()) { /* 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; - if (rcu_cpu_has_nonlazy_callbacks(cpu)) + if (rcu_cpu_has_nonlazy_callbacks(cpu)) { + trace_rcu_prep_idle("Dyntick with callbacks"); per_cpu(rcu_idle_gp_timer_expires, cpu) = jiffies + RCU_IDLE_GP_DELAY; - else + } else { per_cpu(rcu_idle_gp_timer_expires, cpu) = jiffies + RCU_IDLE_LAZY_GP_DELAY; + trace_rcu_prep_idle("Dyntick with lazy callbacks"); + } tp = &per_cpu(rcu_idle_gp_timer, cpu); mod_timer_pinned(tp, per_cpu(rcu_idle_gp_timer_expires, cpu)); per_cpu(rcu_nonlazy_posted_snap, cpu) =