2.6.2-rc2-mm2 CPU Hotplug: i386 support
PATCH 4/4 2.6.2-rc2-mm2 CPU Hotplug: i386 support
This is the i386 portion: we've basically been using it to stress the core code, unlike the PPC64 which actually has hotplug CPUs (but this is better, because we can plug/unplug REALLY fast to find races).
As such, it's a curiousity, and a little rough (doesn't allow boot CPU to go down, for example). But great for playing with the code.
The main change is that the IPI-sending types of code have been changed to use a cpumask_t rather than a count, since cpus may appear and vanish and we don't want to hold a lock.
Name: Hotplug CPU Patch: i386 support: -mm Version
Author: Matt Fleming, Zwane Mwaikambo, Dipankar Sarma, Vatsa Vaddagiri
Status: Experimental
Depends: Hotcpu-mm/hotcpu-with-kthread-simple-mm.patch.gz
Depends: Hotcpu/hotcpu-cpu_active_map.patch.gz
Version: -mm
D: i386 hotplug CPU support, as modified by Dipankar and Vatsa.
arch/i386/Kconfig +9 -0
@@ -1229,6 +1229,15 @@ config HOTPLUG agent" (/sbin/hotplug) to load modules and set up software needed to use devices as you hotplug them. +config HOTPLUG_CPU + bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" + depends on SMP && HOTPLUG && EXPERIMENTAL + ---help--- + Say Y here to experiment with turning CPUs off and on. CPUs + can be controlled through /sys/devices/system/cpu. + + Say N. + source "drivers/pcmcia/Kconfig" source "drivers/pci/hotplug/Kconfig"
arch/i386/kernel/irq.c +69 -0
93 lines not on this page · raw message
arch/i386/kernel/process.c +58 -0
82 lines not on this page · raw message
arch/i386/kernel/smp.c +52 -24
148 lines not on this page · raw message
arch/i386/kernel/smpboot.c +109 -2
164 lines not on this page · raw message
include/asm-i386/cpu.h +2 -0
@@ -4,6 +4,7 @@#include <linux/device.h> #include <linux/cpu.h> #include <linux/topology.h> +#include <linux/percpu.h> #include <asm/node.h>
@@ -23,4 +24,5 @@ static inline int arch_register_cpu(int return register_cpu(&cpu_devices[num].cpu, num, parent); } +DECLARE_PER_CPU (int, cpu_state);#endif /* _ASM_I386_CPU_H_ */
include/asm-i386/smp.h +6 -0
@@ -9,6 +9,7 @@#include <linux/kernel.h> #include <linux/threads.h> #include <linux/cpumask.h> +#include <linux/spinlock.h> #endif #ifdef CONFIG_X86_LOCAL_APIC
@@ -52,6 +53,7 @@ extern void zap_low_mappings (void);*/ #define smp_processor_id () (current_thread_info()->cpu) +extern spinlock_t call_lock;extern cpumask_t cpu_callout_map;#define cpu_possible_map cpu_callout_map
@@ -84,6 +86,10 @@ static __inline int logical_smp_processo }#endif + +extern int __cpu_disable (void ); +extern void __cpu_die (unsigned int cpu); +#endif /* !__ASSEMBLY__ */ #define NO_PROC_ID 0xFF/* No processor magic marker */
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.