All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcu: Do not trace rcu_is_watching() functions
Date: Tue, 5 Nov 2013 03:21:30 -0800	[thread overview]
Message-ID: <20131105112130.GC3947@linux.vnet.ibm.com> (raw)
In-Reply-To: <20131104202736.72dd8e45@gandalf.local.home>

On Mon, Nov 04, 2013 at 08:27:36PM -0500, Steven Rostedt wrote:
> 
> Paul,
> 
> As I added the rcu_is_watching() to the ftrace code to prevent perf
> from tracing functions where RCU is not watching, I noticed that the
> rcu_is_watching() functions can themselves be traced. I would say this
> is a helper function and not something that we need to trace, as it can
> cause a slowdown in function tracing (any recursion is detected, so it
> only affects performance).
> 
> I marked the functions with notrace. You can take this patch and push
> it for 3.13 or I can take it if you give me an "Acked-by". As it only
> affects performance and does not crash the code it's not a must have in
> my tree.
> 
> If you take it, I can write up a better change log too.
> 
> -- Steve
> 
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Given an improved commit log:

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
> index 0fa061d..590c8a8 100644
> --- a/kernel/rcutiny.c
> +++ b/kernel/rcutiny.c
> @@ -179,7 +179,7 @@ EXPORT_SYMBOL_GPL(rcu_irq_enter);
>  /*
>   * Test whether RCU thinks that the current CPU is idle.
>   */
> -bool __rcu_is_watching(void)
> +bool notrace __rcu_is_watching(void)
>  {
>  	return rcu_dynticks_nesting;
>  }
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 981d0c1..499bb2b 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -662,7 +662,7 @@ void rcu_nmi_exit(void)
>   * rcu_is_watching(), the caller of __rcu_is_watching() must have at
>   * least disabled preemption.
>   */
> -bool __rcu_is_watching(void)
> +bool notrace __rcu_is_watching(void)
>  {
>  	return atomic_read(this_cpu_ptr(&rcu_dynticks.dynticks)) & 0x1;
>  }
> @@ -673,7 +673,7 @@ bool __rcu_is_watching(void)
>   * If the current CPU is in its idle loop and is neither in an interrupt
>   * or NMI handler, return true.
>   */
> -bool rcu_is_watching(void)
> +bool notrace rcu_is_watching(void)
>  {
>  	int ret;
> 
> 


      reply	other threads:[~2013-11-05 11:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  1:27 [PATCH] rcu: Do not trace rcu_is_watching() functions Steven Rostedt
2013-11-05 11:21 ` Paul E. McKenney [this message]

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=20131105112130.GC3947@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.