From: Steven Rostedt <rostedt@goodmis.org>
To: Miroslav Benes <mbenes@suse.cz>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2] tracing: Make sure RCU is watching before calling a stack trace
Date: Thu, 18 May 2017 10:04:38 -0400 [thread overview]
Message-ID: <20170518100438.6f0dc42e@gandalf.local.home> (raw)
In-Reply-To: <alpine.LSU.2.20.1705181547170.31625@pobox.suse.cz>
On Thu, 18 May 2017 15:48:55 +0200 (CEST)
Miroslav Benes <mbenes@suse.cz> wrote:
> On Thu, 18 May 2017, Steven Rostedt wrote:
>
> >
> > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> >
> > As stack tracing now requires "rcu watching", force RCU to be watching when
> > recording a stack trace.
> >
> > Link: http://lkml.kernel.org/r/20170512172449.879684501@goodmis.org
> >
> > Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > ---
> >
> > Changes since v1:
> >
> > My testing discovered that the stack trace can be called with
> > interrupts enabled, which is a no no to have when calling
> > rcu_irq_enter(). When interrupts are enabled, as with being in an
> > NMI, RCU will also be watching.
>
> Would rcu_irq_enter_irqson() help then? This is what Petr used in a live
> patching handler.
>
Yes, that could work too, but I wanted to avoid disabling interrupts if
we didn't have to.
> Your solution works too, of course. Just asking if I am not missing
> something.
>
Nope, I was just trying to keep the overhead down. As this can be
called by every event enabled, as well as functions being traced. I
figured that local_save_irqs() is faster than a pair of
local_irq_save()/ local_irq_restore() calls.
-- Steve
next prev parent reply other threads:[~2017-05-18 14:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 13:38 Steven Rostedt
2017-05-18 13:48 ` Miroslav Benes
2017-05-18 14:04 ` Steven Rostedt [this message]
2017-05-18 18:18 ` Miroslav Benes
2017-05-18 14:50 ` Steven Rostedt
2017-05-18 15:47 ` Paul E. McKenney
2017-05-18 16:39 ` Steven Rostedt
2017-05-18 18:45 ` Paul E. McKenney
2017-05-18 19:30 ` Steven Rostedt
2017-05-18 19:50 ` 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=20170518100438.6f0dc42e@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--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
all inboxes | Powered by JetHome®