From patchwork Tue Oct 30 17:05:02 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: 12615 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 17B90242FB for ; Tue, 30 Oct 2012 17:32:31 +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 BB556A18F2D for ; Tue, 30 Oct 2012 17:32:30 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so754748iej.11 for ; Tue, 30 Oct 2012 10:32:30 -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=9WmV0uh/sMqshrc24x4HBYeqzuGZkkNvSOt6CojndDU=; b=AjBu6W40Xv2vCEazUXyYFTAj2K1UnY4DUANbojzJJhQsF7znCz/YvTU7mkJUvRS7o/ Wp9mMHQxgI2euddduluEasKQ/bdcJhH6RlubqHZryNGeDuA8XBNX8Dn6tC6OuRv8xusB OF8VzislFlOI4Elk7FfDPWzZN0jh8baDGMkTPjImerHZQGt7/Z9/BHMrEnhEdGprEo7t G6g/hl1o20+mKGHXF0ab7AMD5P6yrhA3Mk4eoJwxtqZw9ts8CKqkJV3NH4VbVl9qTOQQ AuijmwtdFnQ9qESthiIbgxL8RkUtad3sd1hcI1/ck5LU4ZjuAOsbT2/DwJsPXgZuzgd9 3jdQ== Received: by 10.50.10.199 with SMTP id k7mr2170661igb.70.1351618349356; Tue, 30 Oct 2012 10:32:29 -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 n20csp457705igt; Tue, 30 Oct 2012 10:32:29 -0700 (PDT) Received: by 10.42.61.196 with SMTP id v4mr29454579ich.24.1351618349115; Tue, 30 Oct 2012 10:32:29 -0700 (PDT) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com. [32.97.182.137]) by mx.google.com with ESMTPS id ph2si1344850icb.21.2012.10.30.10.32.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 10:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.137 as permitted sender) client-ip=32.97.182.137; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.137 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2012 13:32:28 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Oct 2012 13:31:51 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 5A8786E804B for ; Tue, 30 Oct 2012 13:31:50 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9UHVmB1229978 for ; Tue, 30 Oct 2012 13:31:49 -0400 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 q9UHVbCJ027851 for ; Tue, 30 Oct 2012 11:31:39 -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 q9UHVaIF027591; Tue, 30 Oct 2012 11:31:37 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 9777CEBED7; Tue, 30 Oct 2012 10:05:14 -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 03/14] rcu: Optimize the 'rcudata' for RCU trace Date: Tue, 30 Oct 2012 10:05:02 -0700 Message-Id: <1351616713-26930-3-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-5806-0000-0000-00001B34D7A5 X-Gm-Message-State: ALoCoQm8gbPWCznTdQ6vd5WD4kbTBzThUZEMsPqjtLPQTCLKb3Onnzvls+HgjP6LYDcUC/9BEx1G From: Michael Wang This patch implements the new 'rcudata' interface under each rsp directory, by using the 'CPU units sequence reading', thus avoiding loss of tracing data. Signed-off-by: Michael Wang Signed-off-by: Paul E. McKenney --- kernel/rcutree_trace.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c index 0dfe9b5..a11522f 100644 --- a/kernel/rcutree_trace.c +++ b/kernel/rcutree_trace.c @@ -174,6 +174,32 @@ static const struct file_operations rcudata_fops = { .release = single_release, }; +static int new_show_rcudata(struct seq_file *m, void *v) +{ + print_one_rcu_data(m, (struct rcu_data *)v); + return 0; +} + +static const struct seq_operations new_rcudate_op = { + .start = r_start, + .next = r_next, + .stop = r_stop, + .show = new_show_rcudata, +}; + +static int new_rcudata_open(struct inode *inode, struct file *file) +{ + return r_open(inode, file, &new_rcudate_op); +} + +static const struct file_operations new_rcudata_fops = { + .owner = THIS_MODULE, + .open = new_rcudata_open, + .read = seq_read, + .llseek = no_llseek, + .release = seq_release, +}; + static void print_one_rcu_data_csv(struct seq_file *m, struct rcu_data *rdp) { if (!rdp->beenonline) @@ -488,6 +514,11 @@ static int __init rcutree_trace_init(void) rspdir = debugfs_create_dir(rsp->name, rcudir); if (!rspdir) goto free_out; + + retval = debugfs_create_file("rcudata", 0444, + rspdir, rsp, &new_rcudata_fops); + if (!retval) + goto free_out; } retval = debugfs_create_file("rcubarrier", 0444, rcudir,