diff options
author | Gautham R Shenoy <ego@in.ibm.com> | 2008-01-25 15:08:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:01 -0500 |
commit | d221938c049f4845da13c8593132595a6b9222a8 (patch) | |
tree | 8eae6c7095a3d7d31d7435befc30019540a4d13e /include/linux/cpu.h | |
parent | 6b2d7700266b9402e12824e11e0099ae6a4a6a79 (diff) |
cpu-hotplug: refcount based cpu hotplug
This patch implements a Refcount + Waitqueue based model for
cpu-hotplug.
Now, a thread which wants to prevent cpu-hotplug, will bump up a global
refcount and the thread which wants to perform a cpu-hotplug operation
will block till the global refcount goes to zero.
The readers, if any, during an ongoing cpu-hotplug operation are blocked
until the cpu-hotplug operation is over.
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Paul Jackson <pj@sgi.com> [For !CONFIG_HOTPLUG_CPU ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r-- | include/linux/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 92f2029a34f3..a40247e4d462 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -83,6 +83,9 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
83 | 83 | ||
84 | #endif /* CONFIG_SMP */ | 84 | #endif /* CONFIG_SMP */ |
85 | extern struct sysdev_class cpu_sysdev_class; | 85 | extern struct sysdev_class cpu_sysdev_class; |
86 | extern void cpu_hotplug_init(void); | ||
87 | extern void cpu_maps_update_begin(void); | ||
88 | extern void cpu_maps_update_done(void); | ||
86 | 89 | ||
87 | #ifdef CONFIG_HOTPLUG_CPU | 90 | #ifdef CONFIG_HOTPLUG_CPU |
88 | /* Stop CPUs going up and down. */ | 91 | /* Stop CPUs going up and down. */ |