diff options
author | Yao Dongdong <yaodongdong@huawei.com> | 2015-02-25 04:09:46 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-03 14:17:34 -0500 |
commit | 9910affa89fe0895153880b115ec243636e70af3 (patch) | |
tree | ab40cc06ff632e6abc46a3aa920575593de9248b | |
parent | e7580f33889299e484a80f42c20611ead42f199e (diff) |
rcu: Remove redundant check of cpu_online()
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>
-rw-r--r-- | kernel/rcu/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index fbe9dd9ced54..23194a77a768 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -2741,7 +2741,7 @@ static void __call_rcu_core(struct rcu_state *rsp, struct rcu_data *rdp, | |||
2741 | * If called from an extended quiescent state, invoke the RCU | 2741 | * If called from an extended quiescent state, invoke the RCU |
2742 | * core in order to force a re-evaluation of RCU's idleness. | 2742 | * core in order to force a re-evaluation of RCU's idleness. |
2743 | */ | 2743 | */ |
2744 | if (!rcu_is_watching() && cpu_online(smp_processor_id())) | 2744 | if (!rcu_is_watching()) |
2745 | invoke_rcu_core(); | 2745 | invoke_rcu_core(); |
2746 | 2746 | ||
2747 | /* If interrupts were disabled or CPU offline, don't invoke RCU core. */ | 2747 | /* If interrupts were disabled or CPU offline, don't invoke RCU core. */ |