[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190729215943.63ff2081@oasis.local.home>
Date: Mon, 29 Jul 2019 21:59:43 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Eiichi Tsukata <devel@...ukata.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing: Prevent RCU EQS breakage in preemptirq events
On Tue, 30 Jul 2019 10:50:36 +0900
Eiichi Tsukata <devel@...ukata.com> wrote:
> >
> > I think they already (try to) do that; see 'tracing_irq_cpu'.
> >
>
> Or you mean something like this?
> As for trace_hardirqs_off_caller:
You missed what Peter said.
>
> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
> index 4d8e99fdbbbe..d39478bcf0f2 100644
> --- a/kernel/trace/trace_preemptirq.c
> +++ b/kernel/trace/trace_preemptirq.c
> @@ -66,7 +66,7 @@ __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
> if (!this_cpu_read(tracing_irq_cpu)) {
^^^^^^^^^^^^^^^
The above makes this called only the first time we disable interrupts.
> this_cpu_write(tracing_irq_cpu, 1);
> tracer_hardirqs_off(CALLER_ADDR0, caller_addr);
> - if (!in_nmi())
> + if (!in_nmi() && !irqs_disabled())
This would always be false. This function is always called with irqs_disabled()!
So no, this is not what is meant.
> trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr);
> }
>
> Or
>
> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
> index 4d8e99fdbbbe..e08c5c6ff2b3 100644
> --- a/kernel/trace/trace_preemptirq.c
> +++ b/kernel/trace/trace_preemptirq.c
> @@ -66,8 +66,6 @@ __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
> if (!this_cpu_read(tracing_irq_cpu)) {
> this_cpu_write(tracing_irq_cpu, 1);
> tracer_hardirqs_off(CALLER_ADDR0, caller_addr);
> - if (!in_nmi())
> - trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr);
And this just removes the tracepoint completely?
-- Steve
> }
>
>
> As for trace_hardirqs_on_caller, it is called when IRQs off and CONTEXT_USER.
> So even though we skipped the trace event if the previous state was already IRQs on,
> we will fall into the same situation.
Powered by blists - more mailing lists