ia64 implementation of cpu bulk removal
PATCH 8/10 ia64 implementation of cpu bulk removal
ia64 specific implementation of cpu bulk removal. Add the config and make __cpu_die/__cpu_disable work with cpumask_t.
Signed-off-by Ashok Raj <[email protected]>
Signed-off-by Shaohua Li <[email protected]>
---
linux-2.6.17-rc3-root/arch/ia64/Kconfig | 11 + linux-2.6.17-rc3-root/arch/ia64/kernel/irq.c | 38 ----- linux-2.6.17-rc3-root/arch/ia64/kernel/smpboot.c | 172 ++++++++++++++++++----- linux-2.6.17-rc3-root/arch/ia64/kernel/time.c | 5 4 files changed, 158 insertions(+), 68 deletions(-)
arch/ia64/Kconfig renamed from arch/ia64/Kconfig~ia64-bulk-cpu-hotplug +11 -0
@@ -270,6 +270,17 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config BULK_CPU_REMOVE + bool "Support for bulk removal of CPUs (EXPERIMENTAL)" + depends on HOTPLUG_CPU && EXPERIMENTAL + help + Say Y if need the ability to remove more than one cpu during cpu + removal. Current mechanisms may be in-efficient when a NUMA + node is being removed, which would involve removing one cpu at a + time. This will let interrupts, timers and processes to be bound + to a CPU that might be removed right after the current cpu is + being offlined. + config SCHED_SMT bool "SMT scheduler support" depends on SMP
arch/ia64/kernel/irq.c renamed from arch/ia64/kernel/irq.c~ia64-bulk-cpu-hotplug +2 -36
@@ -114,7 +114,7 @@ unsigned int vectors_in_migration[NR_IRQ* Since cpu_online_map is already updated, we just need to check for * affinity that has zeros */ -static void migrate_irqs (void ) +void ia64_migrate_irqs (void ) {cpumask_t mask;irq_desc_t *desc;
@@ -159,34 +159,9 @@ static void migrate_irqs(void) } } -void fixup_irqs (void ) +void ia64_fixup_irqs (void ) {unsigned int irq; -extern void ia64_process_pending_intr (void ); -extern void ia64_disable_timer (void ); -extern volatile int time_keeper_id; - -ia64_disable_timer (); - -/* -* Find a new timesync master -*/ -if (smp_processor_id () == time_keeper_id) { - time_keeper_id =first_cpu (cpu_online_map); -printk ("CPU %d is now promoted to time-keeper master\n" , time_keeper_id); - } - -/* -* Phase 1: Locate irq's bound to this cpu and -* relocate them for cpu removal. -*/ -migrate_irqs (); - -/* -* Phase 2: Perform interrupt processing for all entries reported in -* local APIC. -*/ -ia64_process_pending_intr ();/* * Phase 3: Now handle any interrupts not captured in local APIC.
@@ -199,14 +174,5 @@ void fixup_irqs(void) __do_IRQ(irq, NULL); } } - -/* -* Now let processor die. We do irq disable and max_xtp() to -* ensure there is no more interrupts routed to this processor. -* But the local timer interrupt can have 1 pending which we -* take care in timer_interrupt(). -*/ -max_xtp (); -local_irq_disable (); }#endif
arch/ia64/kernel/smpboot.c renamed from arch/ia64/kernel/smpboot.c~ia64-bulk-cpu-hotplug +140 -32
213 lines not on this page · raw message
arch/ia64/kernel/time.c renamed from arch/ia64/kernel/time.c~ia64-bulk-cpu-hotplug +5 -0
@@ -241,6 +241,11 @@ void __devinit ia64_disable_timer(void)ia64_set_itv (1 <<16 ); } +void __devinit ia64_enable_timer (void ) +{ +ia64_set_itv (IA64_TIMER_VECTOR ); +} +void __init time_init (void ) {
_