From: "Paul E. McKenney" <paulmck@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
"Joel Fernandes (Google)" <joel@joelfernandes.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Josh Triplett <josh@joshtriplett.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>
Subject: Re: [PATCH v2] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook
Date: Wed, 12 Feb 2020 01:05:20 -0800 [thread overview]
Message-ID: <20200212090520.GQ2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200212080522.GP14897@hirez.programming.kicks-ass.net>
On Wed, Feb 12, 2020 at 09:05:22AM +0100, Peter Zijlstra wrote:
> On Tue, Feb 11, 2020 at 10:54:57AM -0800, Paul E. McKenney wrote:
> > On Tue, Feb 11, 2020 at 06:32:13PM +0100, Peter Zijlstra wrote:
> > > On Tue, Feb 11, 2020 at 06:29:52PM +0100, Peter Zijlstra wrote:
> > > > +#define trace_rcu_enter() \
> > > > +({ \
> > > > + unsigned long state = 0; \
> > > > + if (!rcu_is_watching()) { \
> > >
> > > Also, afaict rcu_is_watching() itself needs more love, the functio has
> > > notrace, but calls other stuff that does not have notrace or inline.
> >
> > Good catch! Like this?
> >
> > Thanx, Paul
> >
> > ------------------------------------------------------------------------
> >
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index 1f5fdf7..51616e72 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -295,7 +295,7 @@ static void rcu_dynticks_eqs_online(void)
> > *
> > * No ordering, as we are sampling CPU-local information.
> > */
> > -static bool rcu_dynticks_curr_cpu_in_eqs(void)
> > +static bool notrace rcu_dynticks_curr_cpu_in_eqs(void)
>
> Right, except that, given the size of the thing, I'd opt for 'inline'
> over 'notrace'.
Like this, then?
Thanx, Paul
------------------------------------------------------------------------
commit 164a7e5204cf32d22d0e444efd97ac7f2243b8d2
Author: Paul E. McKenney <paulmck@kernel.org>
Date: Tue Feb 11 11:10:00 2020 -0800
rcu: Make rcu_dynticks_curr_cpu_in_eqs() be inline
The rcu_is_watching() function is and must be notrace in order to allow
it to be used by the tracing infrastructure. However, it also invokes
rcu_dynticks_curr_cpu_in_eqs(), which therefore needs to be either
notrace or inline. But isn't.
This commit therefore adds "inline" to the rcu_dynticks_curr_cpu_in_eqs()
definition.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1f5fdf7..16fd113 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -295,7 +295,7 @@ static void rcu_dynticks_eqs_online(void)
*
* No ordering, as we are sampling CPU-local information.
*/
-static bool rcu_dynticks_curr_cpu_in_eqs(void)
+static bool inline rcu_dynticks_curr_cpu_in_eqs(void)
{
struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
next prev parent reply other threads:[~2020-02-12 9:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 14:50 [PATCH v2] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook Steven Rostedt
2020-02-11 15:34 ` Mathieu Desnoyers
2020-02-11 15:46 ` Peter Zijlstra
2020-02-11 16:02 ` Mathieu Desnoyers
2020-02-11 15:34 ` Peter Zijlstra
2020-02-11 16:18 ` Steven Rostedt
2020-02-11 16:27 ` Mathieu Desnoyers
2020-02-11 16:35 ` Steven Rostedt
2020-02-11 17:29 ` Peter Zijlstra
2020-02-11 17:32 ` Peter Zijlstra
2020-02-11 18:54 ` Paul E. McKenney
2020-02-12 8:05 ` Peter Zijlstra
2020-02-12 9:05 ` Paul E. McKenney [this message]
2020-02-11 17:35 ` Mathieu Desnoyers
2020-02-12 8:02 ` Peter Zijlstra
2020-02-12 15:14 ` Mathieu Desnoyers
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=20200212090520.GQ2935@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@embeddedor.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).