Re: [PATCH] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook

From: Paul E. McKenney
Date: Tue Feb 11 2020 - 10:40:42 EST


On Tue, Feb 11, 2020 at 04:31:24PM +0100, Peter Zijlstra wrote:
> On Tue, Feb 11, 2020 at 07:06:15AM -0800, Paul E. McKenney wrote:
> > And I have to ask... What happens if we are very early in from-idle
> > NMI entry (or very late in NMI exit), such that both in_nmi() and
> > rcu_is_watching() are returning false? Or did I miss a turn somewhere?
>
> We must, by very careful inspection, ensure that doesn't happen.
>
> No tracing must happen before preempt_count increment / after
> preempt_count decrement. Otherwise we can no longer recover.

I was afraid of that, but agreed. ;-)

Thanx, Paul