From patchwork Tue Oct 30 17:05:13 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: 12610 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 DF28A23F56 for ; Tue, 30 Oct 2012 17:31:55 +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 7AC7CA18890 for ; Tue, 30 Oct 2012 17:31:55 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so754748iej.11 for ; Tue, 30 Oct 2012 10:31:55 -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-ibm-iss-spamdetectors :x-ibm-iss-detailinfo:x-gm-message-state; bh=ZrN5ZVV/vDk3NkmQ7zgb9r7Wf0lQZO9/5eKMIW0wJTw=; b=dtTUqh0tALybBmRZDeZvSK6bV1kxxeccRG+Kq89CLM1pzhH8endRaFVTdAu87ibWdr q0Mb2oSgxjw61oe2Mm5W1+UvH4jwLe70AT1j7ZdzDTiIb32VCNwjMYKgDROHncWKFH+x y1edSsvJjOfBL6bGOfiq8lk2Eoxunts+3Mm0qJWF8KaOJ/RPi0nLhhwL4oWCylldIONy OzGG3sJ0vN/vhMowYdOalc0vLXEpF47Mb9MZjg0Al2wqKZI3LZKTiORBmLNS0HkcrwjX v30SeKm7iq8geO70dg/ECToRDDaEcajMvkxB3GwR+u4CtKLyIChCFGdpBBTPT6Tq/Pz4 Z/jg== Received: by 10.50.140.97 with SMTP id rf1mr2168586igb.70.1351618315222; Tue, 30 Oct 2012 10:31:55 -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 n20csp457590igt; Tue, 30 Oct 2012 10:31:55 -0700 (PDT) Received: by 10.50.7.234 with SMTP id m10mr2220281iga.43.1351618314905; Tue, 30 Oct 2012 10:31:54 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com. [32.97.110.151]) by mx.google.com with ESMTPS id s10si1341893ice.34.2012.10.30.10.31.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 10:31:54 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.151 as permitted sender) client-ip=32.97.110.151; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.151 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2012 11:31:53 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Oct 2012 11:31:48 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 40DBC19D8059; Tue, 30 Oct 2012 11:31:47 -0600 (MDT) 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 q9UHVj9c116250; Tue, 30 Oct 2012 11:31:45 -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 q9UHVb1m027727; Tue, 30 Oct 2012 11:31:38 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-49-139-14.mts.ibm.com [9.49.139.14]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9UHVZCe027425; Tue, 30 Oct 2012 11:31:36 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 893F1EBEE5; Tue, 30 Oct 2012 10:05:15 -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 14/14] rcu: Add tracing for synchronize_sched_expedited() Date: Tue, 30 Oct 2012 10:05:13 -0700 Message-Id: <1351616713-26930-14-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1351616713-26930-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20121030170454.GA25712@linux.vnet.ibm.com> <1351616713-26930-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12103017-2398-0000-0000-00000D0EC818 X-IBM-ISS-SpamDetectors: X-IBM-ISS-DetailInfo: BY=3.00000294; HX=3.00000198; KW=3.00000007; PH=3.00000001; SC=3.00000008; SDB=6.00187004; UDB=6.00042361; UTC=2012-10-30 17:31:53 X-Gm-Message-State: ALoCoQkuUYF1E+ZUVaFldWui4tT22i3iLHATVT2DsF7vtfT89utpRqM/hC1S6N7yxVVjw4YLIpOd From: "Paul E. McKenney" This commit adds a per-RCU-flavor "rcuexp" file that dumps out statistics for synchonize_sched_expedited(). Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutree_trace.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c index c6f9cb3..e84679c 100644 --- a/kernel/rcutree_trace.c +++ b/kernel/rcutree_trace.c @@ -171,6 +171,45 @@ static const struct file_operations rcudata_fops = { .release = seq_release, }; +static int show_rcuexp(struct seq_file *m, void *v) +{ + struct rcu_state *rsp = (struct rcu_state *)v; + + seq_printf(m, "s=%lu d=%lu w=%lu tf=%lu wd1=%lu wd2=%lu n=%lu sc=%lu dt=%lu dl=%lu dx=%lu", + atomic_long_read(&rsp->expedited_start), + atomic_long_read(&rsp->expedited_done), + atomic_long_read(&rsp->expedited_wrap), + atomic_long_read(&rsp->expedited_tryfail), + atomic_long_read(&rsp->expedited_workdone1), + atomic_long_read(&rsp->expedited_workdone2), + atomic_long_read(&rsp->expedited_normal), + atomic_long_read(&rsp->expedited_stoppedcpus), + atomic_long_read(&rsp->expedited_done_tries), + atomic_long_read(&rsp->expedited_done_lost), + atomic_long_read(&rsp->expedited_done_exit)); + return 0; +} + +static const struct seq_operations rcuexp_op = { + .start = r_start, + .next = r_next, + .stop = r_stop, + .show = show_rcuexp, +}; + +static int rcuexp_open(struct inode *inode, struct file *file) +{ + return r_open(inode, file, &rcuexp_op); +} + +static const struct file_operations rcuexp_fops = { + .owner = THIS_MODULE, + .open = rcuexp_open, + .read = seq_read, + .llseek = no_llseek, + .release = seq_release, +}; + #ifdef CONFIG_RCU_BOOST static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp) @@ -402,6 +441,11 @@ static int __init rcutree_trace_init(void) if (!retval) goto free_out; + retval = debugfs_create_file("rcuexp", 0444, + rspdir, rsp, &rcuexp_fops); + if (!retval) + goto free_out; + retval = debugfs_create_file("rcu_pending", 0444, rspdir, rsp, &rcu_pending_fops); if (!retval)