Skip to content

Commit

Permalink
rcu: Remove redundant check of cpu_online()
Browse files Browse the repository at this point in the history
Because invoke_cpu_core() checks whether the current CPU is online,
there is no need for __call_rcu_core() to redundantly check it.
There should not be any performance degradation because the called
function is visible to the compiler.  This commit therefore removes
the redundant check.

Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Yao Dongdong authored and Paul E. McKenney committed Mar 3, 2015
1 parent e7580f3 commit 9910aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ static void __call_rcu_core(struct rcu_state *rsp, struct rcu_data *rdp,
* If called from an extended quiescent state, invoke the RCU
* core in order to force a re-evaluation of RCU's idleness.
*/
if (!rcu_is_watching() && cpu_online(smp_processor_id()))
if (!rcu_is_watching())
invoke_rcu_core();

/* If interrupts were disabled or CPU offline, don't invoke RCU core. */
Expand Down

0 comments on commit 9910aff

Please sign in to comment.