From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] printk/tracing: Do not trace printk_nmi_enter()
Date: Fri, 7 Sep 2018 17:35:38 +0900 [thread overview]
Message-ID: <20180907083538.GA2279@jagdpanzerIV> (raw)
In-Reply-To: <20180907082834.vjycyvt6nddpb4la@pathway.suse.cz>
On (09/07/18 10:28), Petr Mladek wrote:
> On Fri 2018-09-07 09:45:31, Peter Zijlstra wrote:
> > On Thu, Sep 06, 2018 at 11:31:51AM +0900, Sergey Senozhatsky wrote:
> > > An alternative option, thus, could be re-instating back the rule that
> > > lockdep_off/on should be the first and the last thing we do in
> > > nmi_enter/nmi_exit. E.g.
> > >
> > > nmi_enter()
> > > lockdep_off();
> > > printk_nmi_enter();
> > >
> > > nmi_exit()
> > > printk_nmi_exit();
> > > lockdep_on();
> >
> > Yes that. Also, those should probably be inline functions.
> >
> > ---
> > Subject: locking/lockdep: Fix NMI handling
> >
> > Someone put code in the NMI handler before lockdep_off(). Since lockdep
> > is not NMI safe, this wrecks stuff.
>
> My view is that nmi_enter() has to switch several features into
> NMI-safe mode. The code must not trigger the other features when
> they are still in the unsafe mode.
>
> It is a chicken&egg problem. And it is hard to completely prevent
> regressions caused by future changes.
>
> I though that printk_nmi_enter() should never need any lockdep-related
> code. On the other hand, people might want to printk debug messages
> when lockdep_off() is called. This is why I put it in the current order.
>
> That said, I am not against this change. Especially the inlining
> is a good move. Note that lockdep_off()/lockdep_on() must not
> be traced as well.
Should't printk_nmi_enter()/printk_nmi_exit() still be notrace?
Like you and Steven said - it's still before ftrace_nmi_enter()
and should be notrace regardless.
-ss
next prev parent reply other threads:[~2018-09-07 8:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 1:33 [PATCH] printk/tracing: Do not trace printk_nmi_enter() Steven Rostedt
2018-09-06 2:31 ` Sergey Senozhatsky
2018-09-06 9:04 ` Petr Mladek
2018-09-06 15:22 ` Steven Rostedt
2018-09-07 7:45 ` Peter Zijlstra
2018-09-07 8:28 ` Petr Mladek
2018-09-07 8:35 ` Sergey Senozhatsky [this message]
2018-09-07 13:47 ` Steven Rostedt
2018-09-07 9:30 ` Peter Zijlstra
2018-09-07 13:53 ` Steven Rostedt
2018-09-10 5:32 ` locking/lockdep: Fix NMI handling kbuild test robot
2018-09-07 7:34 ` [PATCH] printk/tracing: Do not trace printk_nmi_enter() Peter Zijlstra
2018-09-07 13:41 ` Steven Rostedt
2018-09-07 13:45 ` Peter Zijlstra
2018-09-07 13:55 ` Steven Rostedt
2018-09-07 14:01 ` Steven Rostedt
2018-09-07 14:03 ` Peter Zijlstra
2018-09-07 14:52 ` Sergey Senozhatsky
2018-09-07 14:02 ` Peter Zijlstra
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=20180907083538.GA2279@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.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