diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-01-07 14:03:57 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-02-21 12:03:34 -0500 |
commit | e5601400081651060a59bd1f45f2821bb8e97f95 (patch) | |
tree | 391e7e0b08d8b642eca260950c7f052832411aa9 /kernel/rcutree_plugin.h | |
parent | ae1f18e480c83d15539fb234a2dc5f0aa04cb119 (diff) |
rcu: Simplify offline processing
Move ->qsmaskinit and blkd_tasks[] manipulation to the CPU_DYING
notifier. This simplifies the code by eliminating a potential
deadlock and by reducing the responsibilities of force_quiescent_state().
Also rename functions to make their connection to the CPU-hotplug
stages explicit.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r-- | kernel/rcutree_plugin.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 7adf232bb66b..eeb2cc6b8657 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -618,16 +618,16 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp, | |||
618 | return retval; | 618 | return retval; |
619 | } | 619 | } |
620 | 620 | ||
621 | #endif /* #ifdef CONFIG_HOTPLUG_CPU */ | ||
622 | |||
621 | /* | 623 | /* |
622 | * Do CPU-offline processing for preemptible RCU. | 624 | * Do CPU-offline processing for preemptible RCU. |
623 | */ | 625 | */ |
624 | static void rcu_preempt_offline_cpu(int cpu) | 626 | static void rcu_preempt_cleanup_dead_cpu(int cpu) |
625 | { | 627 | { |
626 | __rcu_offline_cpu(cpu, &rcu_preempt_state); | 628 | rcu_cleanup_dead_cpu(cpu, &rcu_preempt_state); |
627 | } | 629 | } |
628 | 630 | ||
629 | #endif /* #ifdef CONFIG_HOTPLUG_CPU */ | ||
630 | |||
631 | /* | 631 | /* |
632 | * Check for a quiescent state from the current CPU. When a task blocks, | 632 | * Check for a quiescent state from the current CPU. When a task blocks, |
633 | * the task is recorded in the corresponding CPU's rcu_node structure, | 633 | * the task is recorded in the corresponding CPU's rcu_node structure, |
@@ -912,11 +912,12 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu) | |||
912 | } | 912 | } |
913 | 913 | ||
914 | /* | 914 | /* |
915 | * Move preemptible RCU's callbacks from dying CPU to other online CPU. | 915 | * Move preemptible RCU's callbacks from dying CPU to other online CPU |
916 | * and record a quiescent state. | ||
916 | */ | 917 | */ |
917 | static void rcu_preempt_send_cbs_to_online(void) | 918 | static void rcu_preempt_cleanup_dying_cpu(void) |
918 | { | 919 | { |
919 | rcu_send_cbs_to_online(&rcu_preempt_state); | 920 | rcu_cleanup_dying_cpu(&rcu_preempt_state); |
920 | } | 921 | } |
921 | 922 | ||
922 | /* | 923 | /* |
@@ -1052,16 +1053,16 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp, | |||
1052 | return 0; | 1053 | return 0; |
1053 | } | 1054 | } |
1054 | 1055 | ||
1056 | #endif /* #ifdef CONFIG_HOTPLUG_CPU */ | ||
1057 | |||
1055 | /* | 1058 | /* |
1056 | * Because preemptible RCU does not exist, it never needs CPU-offline | 1059 | * Because preemptible RCU does not exist, it never needs CPU-offline |
1057 | * processing. | 1060 | * processing. |
1058 | */ | 1061 | */ |
1059 | static void rcu_preempt_offline_cpu(int cpu) | 1062 | static void rcu_preempt_cleanup_dead_cpu(int cpu) |
1060 | { | 1063 | { |
1061 | } | 1064 | } |
1062 | 1065 | ||
1063 | #endif /* #ifdef CONFIG_HOTPLUG_CPU */ | ||
1064 | |||
1065 | /* | 1066 | /* |
1066 | * Because preemptible RCU does not exist, it never has any callbacks | 1067 | * Because preemptible RCU does not exist, it never has any callbacks |
1067 | * to check. | 1068 | * to check. |
@@ -1153,9 +1154,9 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu) | |||
1153 | } | 1154 | } |
1154 | 1155 | ||
1155 | /* | 1156 | /* |
1156 | * Because there is no preemptible RCU, there are no callbacks to move. | 1157 | * Because there is no preemptible RCU, there is no cleanup to do. |
1157 | */ | 1158 | */ |
1158 | static void rcu_preempt_send_cbs_to_online(void) | 1159 | static void rcu_preempt_cleanup_dying_cpu(void) |
1159 | { | 1160 | { |
1160 | } | 1161 | } |
1161 | 1162 | ||