From: William Lee Irwin III <wli@holomorphy.com>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: Jos Hulzink <josh@stack.nl>,
"Martin J. Bligh" <mbligh@aracnet.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: irq balancing: performance disaster
Date: Sun, 11 May 2003 06:15:21 -0700 [thread overview]
Message-ID: <20030511131521.GK8978@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.50.0305110855120.15337-100000@montezuma.mastecende.com>
On Sun, 11 May 2003, William Lee Irwin III wrote:
>> 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.
On Sun, May 11, 2003 at 08:58:57AM -0400, Zwane Mwaikambo wrote:
> Nice, it's during init too so there really is no need for any sort of
> optimisation, the inline can also go and make it __init.
Very good point. The static variable in an inline function is very fishy
also. Here it is:
-- wli
Un-#idef target_cpus() and also shove it into arch/i386/kernel/io_apic.c
as both static and __init.
arch/i386/kernel/io_apic.c | 19 +++++++++++++++++++
include/asm-i386/smpboot.h | 20 --------------------
2 files changed, 19 insertions(+), 20 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 06:09:47 2003
@@ -98,24 +98,4 @@
#define boot_apicid_to_cpu(apicid) physical_apicid_2_cpu[apicid]
#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){
- 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;
- return cpu_to_physical_apicid(cpu);
- default:
- }
- return cpu_online_map;
-}
-#else
-#define target_cpus() (cpu_online_map)
-#endif
#endif
diff -prauN linux-2.4.21-pre7-1/arch/i386/kernel/io_apic.c zwane-2.4.21-pre7-1/arch/i386/kernel/io_apic.c
--- linux-2.4.21-pre7-1/arch/i386/kernel/io_apic.c Wed Apr 16 14:32:46 2003
+++ zwane-2.4.21-pre7-1/arch/i386/kernel/io_apic.c Sun May 11 06:10:22 2003
@@ -614,6 +614,25 @@
static struct hw_interrupt_type ioapic_level_irq_type;
static struct hw_interrupt_type ioapic_edge_irq_type;
+static int __init target_cpus(void)
+{
+ switch (clustered_apic_mode) {
+ /* physical broadcast, routed only to local APIC bus */
+ case CLUSTERED_APIC_NUMAQ:
+ return APIC_BROADCAST_ID_APIC;
+ /* 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;
+ }
+}
+
void __init setup_IO_APIC_irqs(void)
{
struct IO_APIC_route_entry entry;
next prev parent reply other threads:[~2003-05-11 13:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-10 23:18 irq balancing: performance disaster Jos Hulzink
2003-05-10 21:42 ` Zwane Mwaikambo
2003-05-11 2:14 ` Martin J. Bligh
2003-05-11 4:46 ` Zwane Mwaikambo
2003-05-11 2:59 ` Martin J. Bligh
2003-05-11 10:00 ` Jos Hulzink
2003-05-11 12:17 ` Zwane Mwaikambo
2003-05-11 12:54 ` William Lee Irwin III
2003-05-11 12:58 ` Zwane Mwaikambo
2003-05-11 13:15 ` William Lee Irwin III [this message]
2003-05-11 13:17 ` Zwane Mwaikambo
2003-05-11 9:07 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030511131521.GK8978@holomorphy.com \
--to=wli@holomorphy.com \
--cc=josh@stack.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=zwane@linuxpower.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.