From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, rjw@sisk.pl,
dipankar@in.ibm.com, tglx@linuxtronix.de, andi@firstfloor.org
Subject: Re: [PATCH] rudimentary tracing for Classic RCU
Date: Thu, 9 Oct 2008 04:50:18 -0700 [thread overview]
Message-ID: <20081009115018.GB6628@linux.vnet.ibm.com> (raw)
In-Reply-To: <48EDA2A6.9070707@cn.fujitsu.com>
On Thu, Oct 09, 2008 at 02:20:22PM +0800, Lai Jiangshan wrote:
Thank you for looking this over!
> Paul E. McKenney wrote:
[ . . . ]
> > diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
> > index 9fdba03..ba32338 100644
> > --- a/kernel/Kconfig.preempt
> > +++ b/kernel/Kconfig.preempt
> > @@ -68,7 +68,6 @@ config PREEMPT_RCU
> >
> > config RCU_TRACE
> > bool "Enable tracing for RCU - currently stats in debugfs"
> > - depends on PREEMPT_RCU
> > select DEBUG_FS
> > default y
> > help
>
> I think that we can move it to lib/Kconfig.debug.
Makes sense!
[ . . . ]
> > +static int __init rcuclassic_trace_init(void)
> > +{
> > + int ret;
> > +
> > + rcuclassic_trace_buf = kmalloc(RCUCLASSIC_TRACE_BUF_SIZE, GFP_KERNEL);
>
> I'm wondering about this.
> rcuclassic_trace_buf is kmalloc-ed when init module.
>
> In this case, why not define it as:
> static char buf[20*NR_CPUS + 100];
>
> and use it like:
> pos += snprintf(buf + cnt, sizeof(buf) - cnt, ...);
I will make Andi's suggested change, both here and in other previously
submitted code.
[ . . . ]
> > + if (!rcuclassic_trace_buf)
> > + return 1;
> > + ret = rcuclassic_debugfs_init();
> > + if (ret)
> > + kfree(rcuclassic_trace_buf);
> > + return ret;
> > +}
> > +
> > +static void __exit rcuclassic_trace_cleanup(void)
> > +{
> > + debugfs_remove(cbdir);
> > + debugfs_remove(rcudir);
> > + kfree(rcuclassic_trace_buf);
> > +}
> > +
> > +
> > +module_init(rcuclassic_trace_init);
> > +module_exit(rcuclassic_trace_cleanup);
>
>
> I think this trace file shows too little vars for classic rcu.
>
> It is better that this trace file shows more data.
> such as some data in struct rcu_data(quiescent state handling fields, batch, qlen).
>
> or add new files: rcu/rcu_data<cpu#>
Indeed! I will add the ability to dump the rcu_data structures, though
I was planning to just dump all of them rather than CPU-by-CPU. (Same
approach as in rcutree_trace.c patches.)
Thanx, Paul
next prev parent reply other threads:[~2008-10-09 11:50 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 14:12 scheduler hang on cpu re-hotplug with 2.6.27rc8 Andi Kleen
2008-10-06 23:28 ` RCU " Andi Kleen
2008-10-07 3:08 ` Paul E. McKenney
2008-10-07 7:15 ` Andi Kleen
2008-10-07 15:26 ` Paul E. McKenney
2008-10-07 15:49 ` Andi Kleen
2008-10-07 16:34 ` Paul E. McKenney
2008-10-07 21:09 ` Andi Kleen
2008-10-07 21:22 ` Paul E. McKenney
2008-10-09 1:08 ` [PATCH] rudimentary tracing for Classic RCU Paul E. McKenney
2008-10-09 6:20 ` Lai Jiangshan
2008-10-09 6:55 ` Andi Kleen
2008-10-09 7:05 ` Lai Jiangshan
2008-10-09 7:14 ` KOSAKI Motohiro
2008-10-09 7:26 ` Lai Jiangshan
2008-10-09 8:06 ` Andi Kleen
2008-10-10 11:48 ` Paul E. McKenney
2008-10-09 11:50 ` Paul E. McKenney
2008-10-09 11:50 ` Paul E. McKenney [this message]
2008-10-09 10:23 ` Frédéric Weisbecker
2008-10-09 10:53 ` Andi Kleen
2008-10-09 11:44 ` Frédéric Weisbecker
2008-10-09 11:54 ` Paul E. McKenney
2008-10-09 13:01 ` Frédéric Weisbecker
2008-10-10 3:44 ` [PATCH] v2 " Paul E. McKenney
2008-10-13 23:09 ` [PATCH] v3 " Paul E. McKenney
2008-10-14 3:53 ` Lai Jiangshan
2008-10-14 14:35 ` Paul E. McKenney
2008-10-23 11:12 ` Lai Jiangshan
2008-10-26 21:59 ` Paul E. McKenney
2008-10-27 21:50 ` Paul E. McKenney
2008-10-27 23:57 ` Paul E. McKenney
2008-10-29 1:16 ` Paul E. McKenney
2008-10-29 1:31 ` Lai Jiangshan
2008-10-30 15:52 ` Paul E. McKenney
2008-10-09 1:33 ` RCU hang on cpu re-hotplug with 2.6.27rc8 Paul E. McKenney
2008-10-09 4:56 ` Andi Kleen
2008-10-09 7:24 ` Thomas Gleixner
2008-10-09 8:22 ` Andi Kleen
2008-10-09 11:44 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081009115018.GB6628@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=andi@firstfloor.org \
--cc=dipankar@in.ibm.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=tglx@linuxtronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.