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

From: Steven Rostedt
Date: Tue Feb 11 2020 - 09:10:45 EST


On Tue, 11 Feb 2020 13:21:20 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > @@ -68,6 +78,9 @@ perf_trace_##call(void *__data, proto) \
> > perf_trace_run_bpf_submit(entry, __entry_size, rctx, \
> > event_call, __count, __regs, \
> > head, __task); \
> > +out: \
> > + if (!rcu_watching) \
> > + rcu_irq_exit_irqson(); \
> > }
>
> It is probably okay to move that into perf_tp_event(), then this:
>
> > /*
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index 1694a6b57ad8..3e6f07b62515 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -719,6 +719,7 @@ void rcu_irq_exit_irqson(void)
> > rcu_irq_exit();
> > local_irq_restore(flags);
> > }
> > +EXPORT_SYMBOL_GPL(rcu_irq_exit_irqson);
> >
> > /*
> > * Exit an RCU extended quiescent state, which can be either the
> > @@ -890,6 +891,7 @@ void rcu_irq_enter_irqson(void)
> > rcu_irq_enter();
> > local_irq_restore(flags);
> > }
> > +EXPORT_SYMBOL_GPL(rcu_irq_enter_irqson);
> >
> > /*
> > * If any sort of urgency was applied to the current CPU (for example,
>
> can go too. Those things really should not be exported.

Thanks, I'll send an updated patch.

-- Steve