From patchwork Tue Oct 30 17:05:08 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: 12608 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 6B54223F56 for ; Tue, 30 Oct 2012 17:31:46 +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 00FA6A18EEB for ; Tue, 30 Oct 2012 17:31:45 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so754766iej.11 for ; Tue, 30 Oct 2012 10:31:45 -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=Qd1oSmUEVxJe/5Ums2IEEW1EkqRMRvlqoCE5bJSbsCE=; b=dtPugjwtrn0alr7bB69a7Wk8QDBiJZadbcvI20J8iBcP8ejCwloEdJU/I6W/m54/rv D3VVWVaH8d/iWXAAZdK4SC02Vr9MAIYySM01Q+8nAUWWGaGFmObZ1RGcRkp00eskKfgT nWUYesLeUXmPkXUvYIkgOoWgY738uBMUMEoVeid5PhoTcbr3LCVkkdfuuHGF0nJ9woTa P8zc2i1opnjnfPvN48dy436LLrd3rJq28wDjJ2k40OXOWUta9QPcm7gUc4TaOKYv8Uq9 y3nru+n3o6SeHKWKkioQXbTphdVcGt6++xQ1VnKCoRIlOX5BekGF89KLu5r2brLFj++j k/Aw== Received: by 10.50.88.233 with SMTP id bj9mr2164322igb.70.1351618305160; Tue, 30 Oct 2012 10:31:45 -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 n20csp457558igt; Tue, 30 Oct 2012 10:31:44 -0700 (PDT) Received: by 10.50.190.232 with SMTP id gt8mr2197097igc.69.1351618304928; Tue, 30 Oct 2012 10:31:44 -0700 (PDT) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com. [32.97.110.150]) by mx.google.com with ESMTPS id ng8si1342059icb.33.2012.10.30.10.31.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 10:31:44 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2012 11:31:44 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Oct 2012 11:31:42 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 837D9C4000B for ; Tue, 30 Oct 2012 11:31:39 -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 q9UHVd5H138878 for ; Tue, 30 Oct 2012 11:31:39 -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 q9UHVbcN027740 for ; 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 q9UHVZSA027428; Tue, 30 Oct 2012 11:31:36 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 2181CEBEDF; 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, Michael Wang , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 09/14] rcu: split 'rcubarrier' to each flavor Date: Tue, 30 Oct 2012 10:05:08 -0700 Message-Id: <1351616713-26930-9-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-5406-0000-0000-0000018EC6F4 X-Gm-Message-State: ALoCoQltJDx+6hZKs6tk9u21XCmYavNXCwk0Cihpn96TBWWbYqm8AjGrJuFvAFHp4/WQ5LOLnsxb From: Michael Wang This patch add new 'rcubarrier' to each flavor's folder, now we could use: 'cat /debugfs/rcu/rsp/rcubarrier' to get the selected rsp info. Signed-off-by: Michael Wang Signed-off-by: Paul E. McKenney --- kernel/rcutree_trace.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c index 209e696..8b03bfb 100644 --- a/kernel/rcutree_trace.c +++ b/kernel/rcutree_trace.c @@ -101,6 +101,28 @@ static const struct file_operations rcubarrier_fops = { .release = single_release, }; +static int new_show_rcubarrier(struct seq_file *m, void *v) +{ + struct rcu_state *rsp = (struct rcu_state *)m->private; + seq_printf(m, "bcc: %d nbd: %lu\n", + atomic_read(&rsp->barrier_cpu_count), + rsp->n_barrier_done); + return 0; +} + +static int new_rcubarrier_open(struct inode *inode, struct file *file) +{ + return single_open(file, new_show_rcubarrier, inode->i_private); +} + +static const struct file_operations new_rcubarrier_fops = { + .owner = THIS_MODULE, + .open = new_rcubarrier_open, + .read = seq_read, + .llseek = no_llseek, + .release = seq_release, +}; + #ifdef CONFIG_RCU_BOOST static char convert_kthread_status(unsigned int kthread_status) @@ -429,6 +451,11 @@ static int __init rcutree_trace_init(void) rspdir, rsp, &rcu_pending_fops); if (!retval) goto free_out; + + retval = debugfs_create_file("rcubarrier", 0444, + rspdir, rsp, &new_rcubarrier_fops); + if (!retval) + goto free_out; } retval = debugfs_create_file("rcubarrier", 0444, rcudir,