From: Gautham R Shenoy <ego@in.ibm.com>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>,
mingo@elte.hu, linux-kernel@vger.kernel.org,
linux-rt-users@vger.kernel.org, dipankar@in.ibm.com,
paulmck@linux.vnet.ibm.com
Subject: Re: [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing
Date: Fri, 4 Jan 2008 16:28:58 +0530 [thread overview]
Message-ID: <20080104105858.GA13865@in.ibm.com> (raw)
In-Reply-To: <20080103163055.GB27651@Krystal>
On Thu, Jan 03, 2008 at 11:30:55AM -0500, Mathieu Desnoyers wrote:
> * K. Prasad (prasad@linux.vnet.ibm.com) wrote:
> > This patch converts the tracing mechanism of Preempt RCU boosting into
> > markers. The handler functions for these markers are included inside
> > rcupreempt_trace.c and will be included only when PREEMPT_RCU_BOOST is
> > chosen.
> >
> > Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
> > ---
> > include/linux/rcupreempt_trace.h | 46 ++++++++
> > kernel/rcupreempt-boost.c | 211 ++++-----------------------------------
> > kernel/rcupreempt_trace.c | 183 +++++++++++++++++++++++++++++++++
> > 3 files changed, 251 insertions(+), 189 deletions(-)
> >
> > Index: linux-2.6.24-rc2-rt1.MARKER_PATCHES_NEW/include/linux/rcupreempt_trace.h
> > ===================================================================
> > --- linux-2.6.24-rc2-rt1.MARKER_PATCHES_NEW.orig/include/linux/rcupreempt_trace.h
> > +++ linux-2.6.24-rc2-rt1.MARKER_PATCHES_NEW/include/linux/rcupreempt_trace.h
> > @@ -102,5 +102,51 @@ extern int rcupreempt_flip_flag(int cpu)
> > extern int rcupreempt_mb_flag(int cpu);
> > extern char *rcupreempt_try_flip_state_name(void);
> >
> > +#ifdef CONFIG_PREEMPT_RCU_BOOST
> > +struct preempt_rcu_boost_trace {
> > + unsigned long rbs_stat_task_boost_called;
> > + unsigned long rbs_stat_task_boosted;
> > + unsigned long rbs_stat_boost_called;
> > + unsigned long rbs_stat_try_boost;
> > + unsigned long rbs_stat_boosted;
> > + unsigned long rbs_stat_unboost_called;
> > + unsigned long rbs_stat_unboosted;
> > + unsigned long rbs_stat_try_boost_readers;
> > + unsigned long rbs_stat_boost_readers;
> > + unsigned long rbs_stat_try_unboost_readers;
> > + unsigned long rbs_stat_unboost_readers;
> > + unsigned long rbs_stat_over_taken;
> > +};
> > +
> > +#define DEFINE_PREEMPT_RCU_BOOST_MARKER_HANDLER(preempt_rcu_boost_var) \
> > +void preempt_rcu_boost_var##_callback(const struct marker *mdata, \
> > + void *private_data, const char *format, ...) \
> > +{ \
> > + va_list ap; \
> > + int cpu; \
> > + struct preempt_rcu_boost_trace *boost_trace; \
> > + va_start(ap, format); \
> > + cpu = va_arg(ap, typeof(unsigned int)); \
>
> (sorry for late response, I just came back from vacation)
>
> Instead of passing the cpu id as a marker parameter, why don't you
> simply use smp_processor_id() right here ?
>
Agreed.
Also in patch 1, in cases where we're using markers in place of RCU_TRACE_ME(),
we need not pass the parameter and simply use smp_processor_id().
It's only the RCU_TRACE_RDP() that requires cpuid to be passed.
Thanks and Regards
gautham.
> --
> Mathieu Desnoyers
> Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
next prev parent reply other threads:[~2008-01-04 11:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 6:09 K. Prasad
2007-12-31 10:20 ` Ingo Molnar
2008-01-02 3:31 ` Frank Ch. Eigler
2008-01-02 12:47 ` Ingo Molnar
2008-01-02 16:33 ` Frank Ch. Eigler
2008-01-02 17:01 ` Ingo Molnar
2008-01-02 17:56 ` Frank Ch. Eigler
2008-01-02 20:10 ` Ingo Molnar
2008-01-07 18:59 ` Mathieu Desnoyers
2008-01-13 18:07 ` Pavel Machek
2008-01-14 15:35 ` Mathieu Desnoyers
2008-01-14 16:30 ` Linus Torvalds
2008-01-14 19:36 ` Mathieu Desnoyers
2008-01-02 23:49 ` Nicholas Miell
2008-01-03 19:24 ` Mathieu Desnoyers
2008-01-03 16:30 ` Mathieu Desnoyers
2008-01-04 10:58 ` Gautham R Shenoy [this message]
2008-01-05 12:46 ` Mathieu Desnoyers
2008-01-07 19:43 ` K. Prasad
2008-01-07 19:50 ` [PATCH 0/2] Markers Implementation for RCU Tracing - Ver II K. Prasad
2008-02-18 12:21 ` Jan Kiszka
2008-02-18 12:47 ` Jan Kiszka
2008-02-18 19:48 ` Paul E. McKenney
2008-02-18 20:41 ` Mathieu Desnoyers
2008-02-19 16:27 ` Markers: multi-probe locking fun (was: Re: [PATCH 0/2] Markers Implementation for RCU Tracing - Ver II) Jan Kiszka
2008-02-19 20:33 ` Mathieu Desnoyers
2008-02-19 22:18 ` Paul E. McKenney
2008-02-19 22:32 ` Mathieu Desnoyers
2008-02-19 21:54 ` Paul E. McKenney
2008-02-19 22:03 ` Mathieu Desnoyers
2008-02-19 22:19 ` Paul E. McKenney
2008-01-07 19:55 ` [PATCH 1/2] Markers Implementation for RCU Preempt Tracing - Ver II K. Prasad
2008-01-07 19:56 ` [PATCH 2/2] Markers Implementation for Preempt RCU Boost " K. Prasad
2008-01-04 12:09 ` __get_cpu_var() called from a preempt-unsafe context in __rcu_preempt_unboost() ? Gautham R Shenoy
2008-01-04 13:48 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2007-11-29 18:46 [PATCH 2/2] Markers Implementation for Preempt RCU Boost Tracing K. Prasad
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=20080104105858.GA13865@in.ibm.com \
--to=ego@in.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=prasad@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®