From: Andrew Theurer <habanero@us.ibm.com>
To: colpatch@us.ibm.com, William Lee Irwin III <wli@holomorphy.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Zwane Mwaikambo <zwane@linux.realnet.co.sz>,
Robert Love <rml@mvista.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
"David S. Miller" <davem@redhat.com>,
linux-kernel@vger.kernel.org, Martin.Bligh@us.ibm.com,
hbaum@us.ibm.com, cleverdj@us.ibm.com, anton@samba.org
Subject: Re: [patch] 2.4.19-pre10-ac2: O(1) scheduler merge, -A3.
Date: Thu, 20 Jun 2002 15:22:42 -0500 [thread overview]
Message-ID: <200206201522.42503.habanero@us.ibm.com> (raw)
In-Reply-To: <3D0FD8D2.2000602@us.ibm.com>
Ingo,
Could we also change "now" to a longer interval? In netbench, 2.4.18, O1,
irqbalance, I get the following results:
[4-way P4, 4 acenics]
now = jiffies 743 Mbps
now = jiffies*10 784 Mbps
now = jiffies*20 803 Mbps
now = jiffies*30 800 Mbps
now = jiffies*100 770 Mbps
[no irqbalance patch]
all IRQs on one CPU 809 Mbps
1 acenic per CPU 800 Mbps
Either the IRQs don't get to stick around long enough, or there is a high cost
for the IOAPIC programming? Anton may have some info on this as well....
-Andrew Theurer
On Tuesday 18 June 2002 20:05, Matthew Dobson wrote:
> I'm looking at this right now, as it is definitely broken on our NUMA-Q
> hardware when running in multiquad mode. It needs to respect clustered
> APIC mode, so I'm working on it.
>
> Cheers!
>
> -Matt
>
> William Lee Irwin III wrote:
> > On Mon, Jun 17, 2002 at 11:00:26AM +0200, Ingo Molnar wrote:
> >>irqbalance uses the set_ioapic_affinity() method to set affinity. The
> >>clustered APIC code is broken if it doesnt handle this properly. (i dont
> >>have such hardware so i cant tell, but it indeed doesnt appear to handle
> >>this case properly.) By wrapping around at node boundary the irqbalance
> >>code will work just fine.
> >
> > Perhaps a brief look at the code will help. Please forgive my
> > non-preservation of whitespace as I cut and pasted it.
> >
> >
> > static inline void balance_irq(int irq)
> > {
> > #if CONFIG_SMP
> > irq_balance_t *entry = irq_balance + irq;
> > unsigned long now = jiffies;
> >
> > if (unlikely(entry->timestamp != now)) {
> > unsigned long allowed_mask;
> > int random_number;
> >
> > rdtscl(random_number);
> > random_number &= 1;
> >
> > allowed_mask = cpu_online_map & irq_affinity[irq];
> > entry->timestamp = now;
> > entry->cpu = move(entry->cpu, allowed_mask, now, random_number);
> > set_ioapic_affinity(irq, 1 << entry->cpu);
> > }
> > #endif
> > }
> >
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 1 << entry->cpu
> >
> >
> >
> > This could be problematic ...
> >
> >
> > static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
> > {
> > unsigned long flags;
> >
> > /*
> > * Only the first 8 bits are valid.
> > */
> > mask = mask << 24;
> > spin_lock_irqsave(&ioapic_lock, flags);
> > __DO_ACTION(1, = mask, )
> > spin_unlock_irqrestore(&ioapic_lock, flags);
> > }
> >
> >
> > According to this, nothing over 8 cpu's can work as the cpu id is used
> > as a shift into an 8-bit bitfield. Also,
> >
> >
> > #define __DO_ACTION(R, ACTION, FINAL) \
> > \
> > { \
> > int pin; \
> > struct irq_pin_list *entry = irq_2_pin + irq; \
> > \
> > for (;;) { \
> > unsigned int reg; \
> > pin = entry->pin; \
> > if (pin == -1) \
> > break; \
> > reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
> > reg ACTION; \
> > io_apic_modify(entry->apic, reg); \
> > if (!entry->next) \
> > break; \
> > entry = irq_2_pin + entry->next; \
> > } \
> > FINAL; \
> > }
> >
> > ACTION is supposed to be an assignment to reg; in clustered hierarchical
> > destination format this is not a bitmask as assumed by 1 << entry->cpu.
> >
> >
> > Matt, Mike, please comment.
> >
> >
> > Cheers,
> > Bill
>
> -
> 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/
next prev parent reply other threads:[~2002-06-20 20:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-13 19:21 [PATCH] 2.4-ac: sparc64 support for O(1) scheduler Robert Love
2002-06-14 4:25 ` David S. Miller
2002-06-14 17:32 ` Robert Love
2002-06-15 13:22 ` David S. Miller
2002-06-20 19:42 ` Alan Cox
2002-06-16 15:19 ` Ingo Molnar
2002-06-16 17:00 ` [patch] 2.4.19-pre10-ac2: O(1) scheduler merge, -A3 Ingo Molnar
2002-06-16 23:57 ` Robert Love
2002-06-17 0:13 ` J.A. Magallon
2002-06-17 4:28 ` Ingo Molnar
2002-06-17 0:15 ` Robert Love
2002-06-17 3:49 ` Ingo Molnar
2002-06-17 3:57 ` Robert Love
2002-06-17 4:07 ` Ingo Molnar
2002-06-17 4:02 ` Robert Love
2002-06-17 4:26 ` Ingo Molnar
2002-06-17 4:49 ` [patch] 2.5.22 current scheduler bits #1 Ingo Molnar
2002-06-17 3:24 ` [patch] 2.4.19-pre10-ac2: O(1) scheduler merge, -A3 Ingo Molnar
2002-06-17 3:35 ` Robert Love
2002-06-17 4:01 ` Ingo Molnar
2002-06-17 7:50 ` Zwane Mwaikambo
2002-06-17 8:32 ` Ingo Molnar
2002-06-17 8:23 ` Zwane Mwaikambo
2002-06-17 9:00 ` Ingo Molnar
2002-06-17 9:34 ` Zwane Mwaikambo
2002-06-18 7:16 ` William Lee Irwin III
2002-06-19 1:05 ` Matthew Dobson
2002-06-20 20:22 ` Andrew Theurer [this message]
2002-06-24 0:16 ` Martin J. Bligh
2002-06-17 16:26 ` Rusty Russell
2002-06-17 4:51 ` Toshiba PCToPIC97 PC Card freeze in 2.4.18 Stephen Satchell
2002-06-16 23:45 ` [PATCH] 2.4-ac: sparc64 support for O(1) scheduler Robert Love
2002-06-17 5:28 ` David S. Miller
2002-06-17 21:18 ` Robert Love
2002-06-14 22:00 ` Thomas Duffy
2002-06-15 13:35 ` David S. Miller
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=200206201522.42503.habanero@us.ibm.com \
--to=habanero@us.ibm.com \
--cc=Martin.Bligh@us.ibm.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=anton@samba.org \
--cc=cleverdj@us.ibm.com \
--cc=colpatch@us.ibm.com \
--cc=davem@redhat.com \
--cc=hbaum@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rml@mvista.com \
--cc=wli@holomorphy.com \
--cc=zwane@linux.realnet.co.sz \
/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 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®