lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook
On Tue, Feb 11, 2020 at 12:49:54PM +0100, Peter Zijlstra wrote:
> On Mon, Feb 10, 2020 at 05:06:43PM -0500, Steven Rostedt wrote:
> > + if (!rcu_watching) { \
> > + /* Can not use RCU if rcu is not watching and in NMI */ \
> > + if (in_nmi()) \
> > + return; \
> > + rcu_irq_enter_irqson(); \
> > + } \
>
> I saw the same weirdness in __trace_stack(), and I'm confused by it.
>
> How can we ever get to: in_nmi() && !rcu_watching() ? That should be a
> BUG. In particular, nmi_enter() has rcu_nmi_enter().
>
> Paul, can that really happen?

Not sure what the current situation is, but if I remember correctly it
used to be possible to get to an NMI handler without RCU being informed.
If NMI handlers now unconditionally inform RCU, then like you, I don't
see that the "if (in_nmi()) return" is needed.

However, a quick grep for NMI_MASK didn't show me the NMI_MASK bit
getting set. Help?

Thanx, Paul

\
 
 \ /
  Last update: 2020-02-11 14:00    [W:0.088 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site