Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on

From: Mathieu Desnoyers
Date: Fri Apr 27 2018 - 14:42:36 EST

----- On Apr 27, 2018, at 2:11 PM, Joel Fernandes joelaf@xxxxxxxxxx wrote:

> On Fri, Apr 27, 2018 at 9:37 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>> On Fri, 27 Apr 2018 09:30:05 -0700
>> Joel Fernandes <joelaf@xxxxxxxxxx> wrote:
>>> On Fri, Apr 27, 2018 at 7:47 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>>> > On Fri, 27 Apr 2018 10:26:29 -0400 (EDT)
>>> > Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
>>> >
>>> >> The general approach and the implementation look fine, except for
>>> >> one small detail: I would be tempted to explicitly disable preemption
>>> >> around the call to the tracepoint callback for the rcuidle variant,
>>> >> unless we plan to audit every tracer right away to remove any assumption
>>> >> that preemption is disabled in the callback implementation.
>>> >
>>> > I'm thinking that we do that audit. There shouldn't be many instances
>>> > of it. I like the idea that a tracepoint callback gets called with
>>> > preemption enabled.
>>> Here is the list of all callers of the _rcuidle :
>> I was thinking of auditing who registers callbacks to any tracepoints.
> Ok. If you feel strongly about this, I think for now I could also just
> wrap the callback execution with preempt_disable_notrace. And, when/if
> we get to doing the blocking callbacks work, we can considering
> keeping preempts on.

My main point here is to introduce the minimal change (keeping preemption
disabled) needed for the rcuidle variant, and only tackle the work of
dealing with preemptible callbacks when we really need it and when we can
properly test it (e.g. by using it for syscall entry/exit tracing).



Mathieu Desnoyers
EfficiOS Inc.