Re: irq balancing: performance disaster

William Lee Irwin III (wli@holomorphy.com)
Sun, 11 May 2003 05:54:38 -0700


On Sun, May 11, 2003 at 08:17:53AM -0400, Zwane Mwaikambo wrote:
> It was a bug in 2.4, fixed in Alan's tree by setting target_cpus to 0xff
> (previously cpu_online_map). There is no noirqbalance option in 2.4
> because there is no in kernel irq balancer.

I vaguely like this notion because it removes a #ifdef and cleans up
a tiny bit of its surroundings. But it's not quite a one-liner.

-- wli

smpboot.h | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)

diff -prauN linux-2.4.21-pre7-1/include/asm-i386/smpboot.h zwane-2.4.21-pre7-1/include/asm-i386/smpboot.h
--- linux-2.4.21-pre7-1/include/asm-i386/smpboot.h Thu Feb 6 07:39:52 2003
+++ zwane-2.4.21-pre7-1/include/asm-i386/smpboot.h Sun May 11 05:49:41 2003
@@ -99,23 +99,22 @@
#define cpu_to_boot_apicid(cpu) cpu_2_physical_apicid[cpu]
#endif /* CONFIG_MULTIQUAD */

-#ifdef CONFIG_X86_CLUSTERED_APIC
static inline int target_cpus(void)
{
- static int cpu;
- switch(clustered_apic_mode){
+ switch (clustered_apic_mode) {
+ /* physical broadcast, routed only to local APIC bus */
case CLUSTERED_APIC_NUMAQ:
- /* Broadcast intrs to local quad only. */
return APIC_BROADCAST_ID_APIC;
- case CLUSTERED_APIC_XAPIC:
- /*round robin the interrupts*/
- cpu = (cpu+1)%smp_num_cpus;
+ /* round robin the interrupts (physical unicast) */
+ case CLUSTERED_APIC_XAPIC: {
+ static int cpu;
+ cpu = (cpu + 1) % smp_num_cpus;
return cpu_to_physical_apicid(cpu);
+ }
+ /* flat logical broadcast */
+ case CLUSTERED_APIC_NONE:
default:
+ return 0xFF;
}
- return cpu_online_map;
}
-#else
-#define target_cpus() (cpu_online_map)
-#endif
#endif
-
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/