lkml.org 
[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] rcu: Remove fast path from __rcu_process_callbacks()
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
>



\
 
 \ /
  Last update: 2015-02-11 17:21    [W:0.088 / U:7.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site