Re: irq balancing: performance disaster

From: Martin J. Bligh (mbligh@aracnet.com)
Date: Sat May 10 2003 - 21:14:09 EST


> While tackling bug 699, it became clear to me that irq balancing is the cause
> of the performance problems I, and all people using the SMP kernel Mandrake
> 9.1 ships, are dealing with. I got the problems with 2.5.69 too. After
> disabling irq balancing, the system is remarkably faster, and much more
> responsive.
>
> For those interested in the issue, please look at bug 699.

Could you test out this patch from Keith Mannthey if you're having trouble?
It makes irq balance a config option, which makes it easier to disable.
Various people have requested it, but I don't have a box to test it on ;-(
Pulled out of -mjb tree, but should go onto mainline easily.

M.

diff -urpN -X /home/fletch/.diff.exclude 699-oom_locking/arch/i386/Kconfig 700-config_irqbal/arch/i386/Kconfig
--- 699-oom_locking/arch/i386/Kconfig Thu Apr 24 21:41:50 2003
+++ 700-config_irqbal/arch/i386/Kconfig Thu May 1 23:01:18 2003
@@ -834,6 +834,14 @@ config 1000HZ
         bool "1000 Hz"
 endchoice
 
+config IRQBALANCE
+ bool "Enable kernel irq balancing"
+ depends on SMP
+ default y
+ help
+ The defalut yes will allow the kernel to do irq load balancing.
+ Saying no will keep the kernel from doing irq load balancing.
+
 config HAVE_DEC_LOCK
         bool
         depends on (SMP || PREEMPT) && X86_CMPXCHG
diff -urpN -X /home/fletch/.diff.exclude 699-oom_locking/arch/i386/kernel/io_apic.c 700-config_irqbal/arch/i386/kernel/io_apic.c
--- 699-oom_locking/arch/i386/kernel/io_apic.c Thu Apr 24 21:41:08 2003
+++ 700-config_irqbal/arch/i386/kernel/io_apic.c Thu May 1 23:01:18 2003
@@ -263,7 +263,7 @@ static void set_ioapic_affinity (unsigne
         spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
-#if defined(CONFIG_SMP)
+#if defined(CONFIG_IRQBALANCE)
 # include <asm/processor.h> /* kernel_thread() */
 # include <linux/kernel_stat.h> /* kstat */
 # include <linux/slab.h> /* kmalloc() */
@@ -654,8 +654,6 @@ static int __init irqbalance_disable(cha
 
 __setup("noirqbalance", irqbalance_disable);
 
-static void set_ioapic_affinity (unsigned int irq, unsigned long mask);
-
 static inline void move_irq(int irq)
 {
         /* note - we hold the desc->lock */
@@ -667,9 +665,9 @@ static inline void move_irq(int irq)
 
 __initcall(balanced_irq_init);
 
-#else /* !SMP */
+#else /* !IRQBALANCE */
 static inline void move_irq(int irq) { }
-#endif /* defined(CONFIG_SMP) */
+#endif /* defined(IRQBALANCE) */
 
 
 /*

-
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/



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:35 EST