rcu,cleanup: simplify the code when cpu is dying
When we handle the CPU_DYING notifier, the whole system is stopped except for the current CPU. We therefore need no synchronization with the other CPUs. This allows us to move any orphaned RCU callbacks directly to the list of any online CPU without needing to run them through the global orphan lists. These global orphan lists can therefore be dispensed with. This commit makes thes changes, though currently victimizes CPU 0 @@@. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
committed by
Paul E. McKenney
parent
7b27d5475f
commit
29494be71a
@@ -774,11 +774,11 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu)
|
||||
}
|
||||
|
||||
/*
|
||||
* Move preemptable RCU's callbacks to ->orphan_cbs_list.
|
||||
* Move preemptable DYING RCU's callbacks to other online CPU.
|
||||
*/
|
||||
static void rcu_preempt_send_cbs_to_orphanage(void)
|
||||
static void rcu_preempt_send_cbs_to_online(void)
|
||||
{
|
||||
rcu_send_cbs_to_orphanage(&rcu_preempt_state);
|
||||
rcu_send_cbs_to_online(&rcu_preempt_state);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1002,7 +1002,7 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu)
|
||||
/*
|
||||
* Because there is no preemptable RCU, there are no callbacks to move.
|
||||
*/
|
||||
static void rcu_preempt_send_cbs_to_orphanage(void)
|
||||
static void rcu_preempt_send_cbs_to_online(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user