mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] NUMA-Q disable irqbalance
@ 2002-08-05 23:51 Martin J. Bligh
  2002-08-13 16:13 ` Martin J. Bligh
  0 siblings, 1 reply; 41+ messages in thread
From: Martin J. Bligh @ 2002-08-05 23:51 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

This patch is from Matt Dobson. It disables irq_balance for the NUMA-Q
and makes it a config option for everyone else. This is needed for NUMA-Q
to work, since the irq_balance code assumes a logical flat apic addressing
mode that's not true in all cases. We created a config option since 
irq_balance makes performance significantly worse for some workloads.

Please apply,

Martin.

diff -Nur linux-2.5.25-vanilla/arch/i386/Config.help linux-2.5.25-patched/arch/i386/Config.help
--- linux-2.5.25-vanilla/arch/i386/Config.help	Fri Jul  5 16:42:04 2002
+++ linux-2.5.25-patched/arch/i386/Config.help	Thu Jul 11 17:27:01 2002
@@ -41,6 +41,12 @@
   486, 586, Pentiums, and various instruction-set-compatible chips by
   AMD, Cyrix, and others.
 
+CONFIG_IRQ_BALANCE
+  This option is used to turn IRQ Balancing on machines with multiple
+  APIC's (ie: SMP, NUMA, etc) on or off.  This behavior has been seen 
+  under some conditions to reduce performance, and on some platorms causes
+  interesting hangs, particularly those with more than 8 CPUs.
+
 CONFIG_MULTIQUAD
   This option is used for getting Linux to run on a (IBM/Sequent) NUMA 
   multiquad box. This changes the way that processors are bootstrapped,
diff -Nur linux-2.5.25-vanilla/arch/i386/config.in linux-2.5.25-patched/arch/i386/config.in
--- linux-2.5.25-vanilla/arch/i386/config.in	Fri Jul  5 16:42:20 2002
+++ linux-2.5.25-patched/arch/i386/config.in	Thu Jul 11 17:16:52 2002
@@ -164,8 +164,19 @@
    if [ "$CONFIG_X86_UP_IOAPIC" = "y" ]; then
       define_bool CONFIG_X86_IO_APIC y
    fi
+   define_bool CONFIG_IRQBALANCE n
 else
    bool 'Multiquad NUMA system' CONFIG_MULTIQUAD
+   if [ "$CONFIG_MULTIQUAD" = "y" ]; then
+      define_bool CONFIG_IRQBALANCE_DISABLE y
+   else
+      bool 'Turn Off IRQ Balancing' CONFIG_IRQBALANCE_DISABLE
+   fi
+   if [ "$CONFIG_IRQBALANCE_DISABLE" = "y" ]; then
+      define_bool CONFIG_IRQBALANCE n
+   else
+      define_bool CONFIG_IRQBALANCE y
+   fi
 fi
 
 bool 'Machine Check Exception' CONFIG_X86_MCE
diff -Nur linux-2.5.25-vanilla/arch/i386/kernel/io_apic.c linux-2.5.25-patched/arch/i386/kernel/io_apic.c
--- linux-2.5.25-vanilla/arch/i386/kernel/io_apic.c	Fri Jul  5 16:42:20 2002
+++ linux-2.5.25-patched/arch/i386/kernel/io_apic.c	Thu Jul 11 16:12:28 2002
@@ -199,7 +199,7 @@
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
-#if CONFIG_SMP
+#if CONFIG_IRQBALANCE
 
 typedef struct {
 	unsigned int cpu;
@@ -211,15 +211,12 @@
 
 extern unsigned long irq_affinity [NR_IRQS];
 
-#endif
-
 #define IDLE_ENOUGH(cpu,now) \
 		(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1))
 
 #define IRQ_ALLOWED(cpu,allowed_mask) \
 		((1 << cpu) & (allowed_mask))
 
-#if CONFIG_SMP
 static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned long now, int direction)
 {
 	int search_idle = 1;
@@ -264,9 +261,9 @@
 		set_ioapic_affinity(irq, 1 << entry->cpu);
 	}
 }
-#else /* !SMP */
+#else /* !CONFIG_IRQBALANCE */
 static inline void balance_irq(int irq) { }
-#endif
+#endif /* CONFIG_IRQBALANCE */
 
 /*
  * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to


^ permalink raw reply	[flat|nested] 41+ messages in thread
[parent not found: <Pine.LNX.4.33.0208131421190.3110-100000@penguin.transmeta.com.suse.lists.linux.kernel>]
* RE: [PATCH] 2.5.31 Summit NUMA patch with dynamic IRQ balancing
@ 2002-08-24  0:29 Grover, Andrew
  2002-08-26  1:59 ` James Cleverdon
  0 siblings, 1 reply; 41+ messages in thread
From: Grover, Andrew @ 2002-08-24  0:29 UTC (permalink / raw)
  To: 'jamesclv@us.ibm.com', Andi Kleen; +Cc: linux-kernel

> From: James Cleverdon [mailto:jamesclv@us.ibm.com] 
> > This should be moved to acpi.h
> 
> Will be, once I'm sure this is the right way to go.  As 
> mentioned earlier, I'm 
> having ACPI problems that seem to imply ACPI isn't building 
> the full IRQ 
> table.  In 2.4 we could let MPS do this.  Maybe 2.5 will need 
> to revert to 
> that behavior.

What happens when you use the FULL ACPI support? I suspect that you really
do want the interpreter, in order to evaluate _PRTs properly.

ISTR that the reason you are thinking that ACPI only is programming some of
the ioapic entries is because whatever is printing them is looking at the
mp_irqs array. Which is MPS specific. So ACPI doesn't bother filling it all
in. :)

Is that a bug? Should ACPI fill it in completely, or maybe not at all? Don't
know. But it is strictly unnecessary.

Regards -- Andy

^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: [PATCH] 2.5.31 Summit NUMA patch with dynamic IRQ balancing
@ 2002-08-26  7:05 Grover, Andrew
  0 siblings, 0 replies; 41+ messages in thread
From: Grover, Andrew @ 2002-08-26  7:05 UTC (permalink / raw)
  To: 'jamesclv@us.ibm.com', Andi Kleen; +Cc: linux-kernel

> From: James Cleverdon [mailto:jamesclv@us.ibm.com] 
> > What happens when you use the FULL ACPI support? I suspect 
> that you really
> > do want the interpreter, in order to evaluate _PRTs properly.

> Bingo!  With full ACPI turned on, the system does indeed 
> boot.  The extra I/O 
> APIC entries are being programmed from the PRT.
> 
> (Call chain is:  pci_acpi_init --> acpi_pci_irq_init --> 
> mp_parse_prt --> 
> io_apic_set_pci_routing)
> 
> So, given that quite a number of our customers would like to run with 
> hyperthreading turned on, but do not want full ACPI, what is 
> the right thing 
> to do in the HT-only case?  Add extra code to process the 
> PRT?  Fall back on 
> MPS's IRQ records?  Something else entirely?

The solution is ACPI. Full ACPI. What is the problem? I have devoted too
much time already to make  hybrid ACPI/MPS combos work, but that will never
be the right solution.

Please have your customers email me privately and tell me why ~100KB of mem
on a 1GB+ system is something us engineers should spend our valuable time
hacking around, when the correct solution already is implemented and
*works*.

Regards -- Andy

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2002-08-27  7:25 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-05 23:51 [PATCH] NUMA-Q disable irqbalance Martin J. Bligh
2002-08-13 16:13 ` Martin J. Bligh
2002-08-13 16:41   ` Linus Torvalds
2002-08-13 16:57     ` Alan Cox
2002-08-13 17:24       ` Martin J. Bligh
2002-08-13 17:38         ` Alan Cox
2002-08-13 17:14     ` Martin J. Bligh
2002-08-13 17:24       ` Linus Torvalds
2002-08-13 18:02         ` Martin J. Bligh
2002-08-13 18:20           ` Linus Torvalds
2002-08-13 18:58             ` Martin J. Bligh
2002-08-13 19:22               ` Linus Torvalds
2002-08-13 20:04                 ` Martin J. Bligh
2002-08-13 20:22                   ` Linus Torvalds
2002-08-14  5:52                     ` Martin J. Bligh
2002-08-14 10:10                     ` Jos Hulzink
2002-08-14 11:12                       ` David Lang
2002-08-13 20:22                 ` Alan Cox
2002-08-13 20:35                   ` Linus Torvalds
2002-08-13 20:34                     ` Alan Cox
2002-08-13 20:42                     ` Martin J. Bligh
2002-08-13 21:24                       ` Linus Torvalds
2002-08-13 22:29                         ` Andrew Theurer
2002-08-13 23:30                           ` Andrea Arcangeli
2002-08-14 21:16                             ` James Cleverdon
2002-08-23  2:31                             ` [PATCH] 2.5.31 Summit NUMA patch with dynamic IRQ balancing James Cleverdon
2002-08-20  0:49                         ` [PATCH] NUMA-Q disable irqbalance Dave Hansen
2002-08-13 22:08                     ` Rik van Riel
2002-08-13 22:14                       ` Rik van Riel
2002-08-14 14:49                         ` Linus Torvalds
2002-08-14 15:19                           ` Rik van Riel
2002-08-24 12:19                 ` Zwane Mwaikambo
2002-08-27  1:23                   ` James Cleverdon
2002-08-27  7:46                     ` Zwane Mwaikambo
     [not found] <Pine.LNX.4.33.0208131421190.3110-100000@penguin.transmeta.com.suse.lists.linux.kernel>
     [not found] ` <200208131729.50127.habanero@us.ibm.com.suse.lists.linux.kernel>
     [not found]   ` <20020813233007.GV14394@dualathlon.random.suse.lists.linux.kernel>
     [not found]     ` <200208221931.35052.jamesclv@us.ibm.com.suse.lists.linux.kernel>
2002-08-23  7:11       ` [PATCH] 2.5.31 Summit NUMA patch with dynamic IRQ balancing Andi Kleen
2002-08-23  8:48         ` William Lee Irwin III
2002-08-23 14:12         ` Martin J. Bligh
2002-08-23 21:36         ` James Cleverdon
2002-08-24  0:29 Grover, Andrew
2002-08-26  1:59 ` James Cleverdon
2002-08-26  7:05 Grover, Andrew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®