mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	preeti@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com
Subject: Re: [PATCH] tracing: Add comments explaining cpu online filter for trace events
Date: Wed, 13 May 2015 12:21:47 -0400	[thread overview]
Message-ID: <20150513122147.4ead9f07@gandalf.local.home> (raw)
In-Reply-To: <1431533263-5139-1-git-send-email-shreyas@linux.vnet.ibm.com>

On Wed, 13 May 2015 21:37:43 +0530
"Shreyas B. Prabhu" <shreyas@linux.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@linux.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

  reply	other threads:[~2015-05-13 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 16:07 Shreyas B. Prabhu
2015-05-13 16:21 ` Steven Rostedt [this message]
2015-05-14 14:16   ` Shreyas B Prabhu
2015-05-14 14:56     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150513122147.4ead9f07@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=shreyas@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®