public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.21pre3 smp_affinity, very strange
@ 2003-01-19 15:45 Hans Lambrechts
  2003-01-19 18:54 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Lambrechts @ 2003-01-19 15:45 UTC (permalink / raw)
  To: linux-kernel

I noticed this recently:

pc:~ # cat /proc/interrupts
           CPU0       CPU1
  0:      39836          0    IO-APIC-edge  timer
  1:        574          0    IO-APIC-edge  keyboard
  2:          0          0          XT-PIC  cascade
  8:          2          0    IO-APIC-edge  rtc
  9:          0          0    IO-APIC-edge  acpi
 12:      20362          0    IO-APIC-edge  PS/2 Mouse
 14:          7          0    IO-APIC-edge  ide0
 16:       8906          0   IO-APIC-level  aic7xxx
 18:        789          0   IO-APIC-level  eth0
NMI:          0          0
LOC:      39741      39740
ERR:          0
MIS:          0

pc:~ # cat /proc/irq/0/smp_affinity
ffffffff

pc:~ # echo ffffffff > /proc/irq/0/smp_affinity

pc:~ # cat /proc/interrupts
           CPU0       CPU1
  0:      50921        947    IO-APIC-edge  timer
  1:        974          0    IO-APIC-edge  keyboard
  2:          0          0          XT-PIC  cascade
  8:          2          0    IO-APIC-edge  rtc
  9:          0          0    IO-APIC-edge  acpi
 12:      25530          0    IO-APIC-edge  PS/2 Mouse
 14:          7          0    IO-APIC-edge  ide0
 16:       8935          0   IO-APIC-level  aic7xxx
 18:        801          0   IO-APIC-level  eth0
NMI:          0          0
LOC:      51773      51772
ERR:          0
MIS:          0

Did the APIC or mpparse changes cause this?

Please cc me, I'm not on the list.

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

* Re: 2.4.21pre3 smp_affinity, very strange
  2003-01-19 15:45 Hans Lambrechts
@ 2003-01-19 18:54 ` Arjan van de Ven
  2003-01-20 16:41   ` Hans Lambrechts
  0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2003-01-19 18:54 UTC (permalink / raw)
  To: Hans Lambrechts; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]


> Did the APIC or mpparse changes cause this?
+#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() (0x01)
+#endif
(2.4.21-pre3)
that's wrong.....  0x01 -> 0xFF and it should be fixed
 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re:  2.4.21pre3 smp_affinity, very strange
@ 2003-01-19 20:41 Manfred Spraul
  0 siblings, 0 replies; 4+ messages in thread
From: Manfred Spraul @ 2003-01-19 20:41 UTC (permalink / raw)
  To: Hans Lambrechts; +Cc: linux-kernel

Hans wrote:

>pc:~ # cat /proc/interrupts
>           CPU0       CPU1
>  0:      39836          0    IO-APIC-edge  timer
>  1:        574          0    IO-APIC-edge  keyboard
>  2:          0          0          XT-PIC  cascade
>  8:          2          0    IO-APIC-edge  rtc
>  9:          0          0    IO-APIC-edge  acpi
> 12:      20362          0    IO-APIC-edge  PS/2 Mouse
> 14:          7          0    IO-APIC-edge  ide0
> 16:       8906          0   IO-APIC-level  aic7xxx
> 18:        789          0   IO-APIC-level  eth0
>NMI:          0          0
>LOC:      39741      39740
>ERR:          0
>MIS:          0
>  
>
Could you add a few details about your system? E.g. the dmesg log.
What happens if you manually distribute interrupts?
    echo 2 > /proc/irq/12/smp_affinity
    echo 1 > /proc/irq/16/smp_affinity

--
    Manfred


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

* Re: 2.4.21pre3 smp_affinity, very strange
  2003-01-19 18:54 ` Arjan van de Ven
@ 2003-01-20 16:41   ` Hans Lambrechts
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Lambrechts @ 2003-01-20 16:41 UTC (permalink / raw)
  To: linux-kernel

Thanks Manfred and Arjan for responding, and for the solution :-)

My box works now as before.

pc:~ # cat /proc/interrupts
           CPU0       CPU1
  0:       5894       5418    IO-APIC-edge  timer
  1:         57         40    IO-APIC-edge  keyboard
  2:          0          0          XT-PIC  cascade
  8:          0          2    IO-APIC-edge  rtc
  9:          0          0    IO-APIC-edge  acpi
 12:        283        223    IO-APIC-edge  PS/2 Mouse
 14:          4          3    IO-APIC-edge  ide0
 16:       4044       3976   IO-APIC-level  aic7xxx
 18:         50         42   IO-APIC-level  eth0
NMI:      11227      11227
LOC:      11204      11203
ERR:          0
MIS:          0

Patch attached at the bottom of the page. If any comments, please cc me.
 
On Sunday 19 January 2003 19:54, you wrote:
> > Did the APIC or mpparse changes cause this?
>
> +#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() (0x01)
> +#endif
> (2.4.21-pre3)
> that's wrong.....  0x01 -> 0xFF and it should be fixed

--- linux/include/asm-i386/smpboot.h    2003-01-20 16:45:13.000000000 +0100
+++ linux/include/asm-i386/smpboot.h.orig       2003-01-20 16:44:05.000000000 +0100
@@ -116,6 +116,6 @@
        return cpu_online_map;
 }
 #else
-#define target_cpus() (0xFFFFFFFF)
+#define target_cpus() (0x01)
 #endif
 #endif


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

end of thread, other threads:[~2003-01-20 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-19 20:41 2.4.21pre3 smp_affinity, very strange Manfred Spraul
  -- strict thread matches above, loose matches on Subject: below --
2003-01-19 15:45 Hans Lambrechts
2003-01-19 18:54 ` Arjan van de Ven
2003-01-20 16:41   ` Hans Lambrechts

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