[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150513122147.4ead9f07@gandalf.local.home>
Date: Wed, 13 May 2015 12:21:47 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Shreyas B. Prabhu" <shreyas@...ux.vnet.ibm.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
preeti@...ux.vnet.ibm.com, paulmck@...ux.vnet.ibm.com
Subject: Re: [PATCH] tracing: Add comments explaining cpu online filter for
trace events
On Wed, 13 May 2015 21:37:43 +0530
"Shreyas B. Prabhu" <shreyas@...ux.vnet.ibm.com> wrote:
> trace_mm_page_pcpu_drain, trace_kmem_cache_free, trace_mm_page_free
> and trace_tlb_flush can be potentially called from an offlined cpu.
> Since trace points use RCU and RCU should not be used from offlined
> cpus, we have checks to filter out such calls. Add comments to explain
> this.
>
> Signed-off-by: Shreyas B. Prabhu <shreyas@...ux.vnet.ibm.com>
> ---
> This applies on top of patches posted here:
> https://lkml.org/lkml/2015/5/8/527
>
> include/trace/events/kmem.h | 15 +++++++++++++++
> include/trace/events/tlb.h | 5 +++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
> index 6cd975f..9883f2f 100644
> --- a/include/trace/events/kmem.h
> +++ b/include/trace/events/kmem.h
> @@ -146,6 +146,11 @@ DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free,
>
> TP_ARGS(call_site, ptr),
>
> + /*
> + * This trace can be potentially called from an offlined cpu.
> + * Since trace points use RCU and RCU should not be used from
> + * offline cpus, filter such calls out.
> + */
> TP_CONDITION(cpu_online(smp_processor_id()))
> );
>
Thanks for the comments, but can't these still be called with
preemption enabled. What happens when CONFIG_DEBUG_PREEMPT is set and
you enable these tracepoints. Wont it trigger a warning about
smp_processor_id() being used in preemptible code?
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists