[PATCH][2.5] Disable irqbalance for single cpu SMP configurations

Zwane Mwaikambo (zwane@linuxpower.ca)
Mon, 7 Apr 2003 02:04:05 -0400 (EDT)


This patch disables irqbalance and doesn't spawn a kernel thread for
systems which run SMP kernels and only have one online cpu.

Index: linux-2.5.66/arch/i386/kernel/io_apic.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.66/arch/i386/kernel/io_apic.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 io_apic.c
--- linux-2.5.66/arch/i386/kernel/io_apic.c 24 Mar 2003 23:40:27 -0000 1.1.1.1
+++ linux-2.5.66/arch/i386/kernel/io_apic.c 7 Apr 2003 05:19:26 -0000
@@ -603,6 +603,12 @@ static int __init balanced_irq_init(void
c = &boot_cpu_data;
if (irqbalance_disabled)
return 0;
+
+ /* disable irqbalance completely if there is only one processor online */
+ if (num_online_cpus() < 2) {
+ irqbalance_disabled = 1;
+ return 0;
+ }
/*
* Enable physical balance only if more than 1 physical processor
* is present

-- 
function.linuxpower.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/