Tiny RCU updates for v4.1
cover Tiny RCU updates for v4.1
Hello!
This series contains some additional tinification for Tiny RCU:
1. Remove redundant check from rcu_qsctr_help(), courtesy of
Alexander Gordeev.
2. Remove fastpath processing from __rcu_process_callbacks(),
also courtesy of Alexander Gordeev.
Thanx, Paul
------------------------------------------------------------------------
b/kernel/rcu/tiny.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
PATCH 1/2 rcu: Remove unnecessary condition check in rcu_qsctr_help()
From: Alexander Gordeev <[email protected]>
When the ->curtail and ->donetail pointers differ, ->rcucblist always points to the beginning of the current list and thus cannot be NULL. Therefore, the check ->rcucblist != NULL is redundant and this commit removes it.
--- kernel/rcu/tiny.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/rcu/tiny.c +1 -2
@@ -103,8 +103,7 @@ EXPORT_SYMBOL(__rcu_is_watching);static int rcu_qsctr_help (struct rcu_ctrlblk *rcp) {RCU_TRACE (reset_cpu_stall_ticks (rcp)); -if (rcp->rcucblist !=NULL && - rcp->donetail != rcp->curtail) { +if (rcp->donetail != rcp->curtail) { rcp->donetail = rcp->curtail;return 1 ; }
Signature · 1 line
1.8.1.5
PATCH 2/2 rcu: Remove fastpath from __rcu_process_callbacks()
From: Alexander Gordeev <[email protected]>
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.
--- kernel/rcu/tiny.c | 11 ----------- 1 file changed, 11 deletions(-)
kernel/rcu/tiny.c +0 -11
@@ -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 ));
Signature · 1 line
1.8.1.5