Re: [PATCH] tracing/perf: Move rcu_irq_enter/exit_irqson() to perf trace point hook
From: Peter Zijlstra
Date: Tue Feb 11 2020 - 08:17:25 EST
On Tue, Feb 11, 2020 at 05:03:01AM -0800, Paul E. McKenney wrote:
> > It is not the fact that perf issues rcu_read_lock() that is the problem.
> > As we established yesterday, I can probably remove most rcu_read_lock()
> > calls from perf today (yay RCU flavour unification).
>
> Glad some aspect of this unification is actually helping you. ;-)
rcu_read_lock() is exceedingly cheap though, so I never really worried
about it. But now that RCU includes RCU-sched (again) we can go and
remove a bunch of them.
> > As per nmi_enter() calling rcu_nmi_enter() I've always assumed that NMIs
> > are fully covered by RCU.
> >
> > If this isn't so, RCU it terminally broken :-)
>
> All RCU can do is respond to calls to rcu_nmi_enter() and rcu_nmi_exit().
> It has not yet figured out how to force people to add these calls where
> they are needed. ;-)
>
> But yes, it would be very nice if architectures arranged things so
> that all NMI handlers were visible to RCU. And we no longer have
> half-interrupts, so maybe there is hope...
Well,.. you could go back to simply _always_ watching :-)