public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] rcu: Remove fast path from __rcu_process_callbacks()
Date: Wed, 11 Feb 2015 08:11:05 -0800	[thread overview]
Message-ID: <20150211161105.GG4166@linux.vnet.ibm.com> (raw)
In-Reply-To: <cb0bd3d86313f3b275a6d67b0c3668519b7850b2.1423665396.git.agordeev@redhat.com>

On Wed, Feb 11, 2015 at 03:42:38PM +0100, Alexander Gordeev wrote:
> The standard code path accommodates a condition when no
> RCU callbacks are ready to invoke. Since size of the code
> is a priority for tiny RCU, remove the fast path.
> 
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>

Also a good point.  The savings is small in production builds because
the RCU_TRACE() statements are not compiled, but every little bit helps,
and the simplification is good as well.

Queued for 3.21.

							Thanx, Paul

> ---
>  kernel/rcu/tiny.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index d4e7fe5..069742d 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -168,17 +168,6 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
>  	unsigned long flags;
>  	RCU_TRACE(int cb_count = 0);
> 
> -	/* If no RCU callbacks ready to invoke, just return. */
> -	if (&rcp->rcucblist == rcp->donetail) {
> -		RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, 0, -1));
> -		RCU_TRACE(trace_rcu_batch_end(rcp->name, 0,
> -					      !!ACCESS_ONCE(rcp->rcucblist),
> -					      need_resched(),
> -					      is_idle_task(current),
> -					      false));
> -		return;
> -	}
> -
>  	/* Move the ready-to-invoke callbacks to a local list. */
>  	local_irq_save(flags);
>  	RCU_TRACE(trace_rcu_batch_start(rcp->name, 0, rcp->qlen, -1));
> -- 
> 1.8.3.1
> 


  reply	other threads:[~2015-02-11 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 14:42 [PATCH 0/3] rcu: Tweak tiny RCU Alexander Gordeev
2015-02-11 14:42 ` [PATCH 1/3] rcu: Remove unnecessary condition check in rcu_qsctr_help() Alexander Gordeev
2015-02-11 16:09   ` Paul E. McKenney
2015-02-11 14:42 ` [PATCH 2/3] rcu: Remove fast path from __rcu_process_callbacks() Alexander Gordeev
2015-02-11 16:11   ` Paul E. McKenney [this message]
2015-02-11 14:42 ` [PATCH 3/3] rcu: Call trace_rcu_batch_start() with enabled interrupts Alexander Gordeev
2015-02-11 16:13   ` Paul E. McKenney
2015-02-11 16:48     ` Alexander Gordeev
2015-02-11 17:20       ` Paul E. McKenney

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=20150211161105.GG4166@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=agordeev@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox