public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware  related?
@ 2001-01-12 17:16 Manfred Spraul
  2001-01-12 17:33 ` Frank de Lange
  2001-01-12 17:49 ` Alan Cox
  0 siblings, 2 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 17:16 UTC (permalink / raw)
  To: dwmw2, linux-kernel, frank

> 
> manfred@colorfullife.com said: 
> > IRR for interrupt 19 is set, that means the IO APIC has sent the 
> > interrupt to a cpu but not yet received the corresponding EOI. 
> 
> OK, but couldn't we reset it by sending an extra EOI when the drivers 
> decide that they've missed interrupts? 

How?
You send an EOI by writing 0 to the EOI register of the local apic, and
then the local apic automagically checks it's ISR bitfield.
It takes the highest set bit and clears it. Then it checks that bit in
the TMR, and it if's also set in the TMR then it sends an EOI to the IO
apic.

The magic seems to be tamper proof: all bits are read only.

The bit on the IO apic is also read only.
Perhaps with brute force? Switch the interrupt to edge triggered on the
io apic, wait 1 usec, switch it back to level triggered. The IRR bit is
undefined for edge triggered interrupts, perhaps that clears the IRR
bit.

I would first concentrate on the differences between 2.2 and 2.4:

Frank, could you try what happens with the NMI oopser disabled?

The second major difference I'm immediately aware of is the number of
the reschedule/tlb flush/etc interrupt: 2.2 uses the lowest priority,
2.4 the highest priority.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 17:16 QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Manfred Spraul
@ 2001-01-12 17:33 ` Frank de Lange
  2001-01-12 17:51   ` Manfred Spraul
  2001-01-12 17:49 ` Alan Cox
  1 sibling, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 17:33 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel

On Fri, Jan 12, 2001 at 06:16:36PM +0100, Manfred Spraul wrote:
> I would first concentrate on the differences between 2.2 and 2.4:
> 
> Frank, could you try what happens with the NMI oopser disabled?

Here's the results with nmi_watchdog=0

Before network hang (nmi_watchdog=0)
====================================
Jan 12 18:24:43 behemoth kernel: SysRq:
Jan 12 18:24:43 behemoth kernel: print_PIC()
Jan 12 18:24:43 behemoth kernel:
Jan 12 18:24:43 behemoth kernel: printing PIC contents
Jan 12 18:24:43 behemoth kernel: ... PIC  IMR: fffa
Jan 12 18:24:43 behemoth kernel: ... PIC  IRR: 0000
Jan 12 18:24:43 behemoth kernel: ... PIC  ISR: 0000
Jan 12 18:24:43 behemoth kernel: ... PIC ELCR: 1e00
Jan 12 18:24:43 behemoth kernel: print_IO_APIC()
Jan 12 18:24:43 behemoth kernel: number of MP IRQ sources: 23.
Jan 12 18:24:43 behemoth kernel: number of IO-APIC #2 registers: 24.
Jan 12 18:24:43 behemoth kernel: testing the IO APIC.......................
Jan 12 18:24:43 behemoth kernel:
Jan 12 18:24:43 behemoth kernel: IO APIC #2......
Jan 12 18:24:43 behemoth kernel: .... register #00: 02000000
Jan 12 18:24:43 behemoth kernel: .......    : physical APIC id: 02
Jan 12 18:24:43 behemoth kernel: .... register #01: 00170011
Jan 12 18:24:43 behemoth kernel: .......     : max redirection entries: 0017
Jan 12 18:24:43 behemoth kernel: .......     : IO APIC version: 0011
Jan 12 18:24:43 behemoth kernel: .... register #02: 00000000
Jan 12 18:24:43 behemoth kernel: .......     : arbitration: 00
Jan 12 18:24:43 behemoth kernel: .... IRQ redirection table:
Jan 12 18:24:43 behemoth kernel:  NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
Jan 12 18:24:43 behemoth kernel:  00 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  01 003 03  0    0    0   0   0    1    1    39
Jan 12 18:24:43 behemoth kernel:  02 003 03  0    0    0   0   0    1    1    31
Jan 12 18:24:43 behemoth kernel:  03 003 03  0    0    0   0   0    1    1    41
Jan 12 18:24:43 behemoth kernel:  04 003 03  0    0    0   0   0    1    1    49
Jan 12 18:24:43 behemoth kernel:  05 003 03  0    0    0   0   0    1    1    51
Jan 12 18:24:43 behemoth kernel:  06 003 03  0    0    0   0   0    1    1    59
Jan 12 18:24:43 behemoth kernel:  07 003 03  0    0    0   0   0    1    1    61
Jan 12 18:24:43 behemoth kernel:  08 003 03  0    0    0   0   0    1    1    69
Jan 12 18:24:43 behemoth kernel:  09 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  0a 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  0b 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  0c 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  0d 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  0e 003 03  0    0    0   0   0    1    1    71
Jan 12 18:24:43 behemoth kernel:  0f 003 03  0    0    0   0   0    1    1    79
Jan 12 18:24:43 behemoth kernel:  10 003 03  0    1    0   1   0    1    1    81
Jan 12 18:24:43 behemoth kernel:  11 003 03  0    1    0   1   0    1    1    89
Jan 12 18:24:43 behemoth kernel:  12 003 03  0    1    0   1   0    1    1    91
Jan 12 18:24:43 behemoth kernel:  13 003 03  0    1    0   1   0    1    1    99
Jan 12 18:24:43 behemoth kernel:  14 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  15 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  16 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel:  17 000 00  1    0    0   0   0    0    0    00
Jan 12 18:24:43 behemoth kernel: IRQ to pin mappings:
Jan 12 18:24:43 behemoth kernel: IRQ0 -> 2
Jan 12 18:24:43 behemoth kernel: IRQ1 -> 1
Jan 12 18:24:43 behemoth kernel: IRQ3 -> 3
Jan 12 18:24:43 behemoth kernel: IRQ4 -> 4
Jan 12 18:24:43 behemoth kernel: IRQ5 -> 5
Jan 12 18:24:43 behemoth kernel: IRQ6 -> 6
Jan 12 18:24:43 behemoth kernel: IRQ7 -> 7
Jan 12 18:24:43 behemoth kernel: IRQ8 -> 8
Jan 12 18:24:43 behemoth kernel: IRQ13 -> 13
Jan 12 18:24:43 behemoth kernel: IRQ14 -> 14
Jan 12 18:24:43 behemoth kernel: IRQ15 -> 15
Jan 12 18:24:43 behemoth kernel: IRQ16 -> 16
Jan 12 18:24:43 behemoth kernel: IRQ17 -> 17
Jan 12 18:24:43 behemoth kernel: IRQ18 -> 18
Jan 12 18:24:43 behemoth kernel: IRQ19 -> 19
Jan 12 18:24:43 behemoth kernel: .................................... done.
Jan 12 18:24:43 behemoth kernel: print_all_local_APICs()
Jan 12 18:24:43 behemoth kernel:
Jan 12 18:24:43 behemoth kernel: printing local APIC contents on CPU#1/1:
Jan 12 18:24:43 behemoth kernel: ... APIC ID:      01000000 (1)
Jan 12 18:24:43 behemoth kernel: ... APIC VERSION: 00040011
Jan 12 18:24:43 behemoth kernel: ... APIC TASKPRI: 00000000 (00)
Jan 12 18:24:43 behemoth kernel: ... APIC ARBPRI: 00000000 (00)
Jan 12 18:24:43 behemoth kernel: ... APIC PROCPRI: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC EOI: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC LDR: 02000000
Jan 12 18:24:43 behemoth kernel: ... APIC DFR: ffffffff
Jan 12 18:24:43 behemoth kernel: ... APIC SPIV: 000003ff
Jan 12 18:24:43 behemoth kernel: ... APIC ISR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 7 times
Jan 12 18:24:43 behemoth kernel: ... APIC TMR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 3 times
Jan 12 18:24:43 behemoth kernel: 00000000010000000000000001000000
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 2 times
Jan 12 18:24:43 behemoth kernel: ... APIC IRR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 7 times
Jan 12 18:24:43 behemoth kernel: ... APIC ESR: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC ICR: 000008fc
Jan 12 18:24:43 behemoth kernel: ... APIC ICR2: 01000000
Jan 12 18:24:43 behemoth kernel: ... APIC LVTT: 000200ef
Jan 12 18:24:43 behemoth kernel: ... APIC LVTPC: 00010000
Jan 12 18:24:43 behemoth kernel: ... APIC LVT0: 00010700
Jan 12 18:24:43 behemoth kernel: ... APIC LVT1: 00010400
Jan 12 18:24:43 behemoth kernel: ... APIC LVTERR: 000000fe
Jan 12 18:24:43 behemoth kernel: ... APIC TMICT: 0000a322
Jan 12 18:24:43 behemoth kernel: ... APIC TMCCT: 00000be6
Jan 12 18:24:43 behemoth kernel: ... APIC TDCR: 00000003
Jan 12 18:24:43 behemoth kernel:
Jan 12 18:24:43 behemoth kernel:
Jan 12 18:24:43 behemoth kernel: printing local APIC contents on CPU#0/0:
Jan 12 18:24:43 behemoth kernel: ... APIC ID:      00000000 (0)
Jan 12 18:24:43 behemoth kernel: ... APIC VERSION: 00040011
Jan 12 18:24:43 behemoth kernel: ... APIC TASKPRI: 00000000 (00)
Jan 12 18:24:43 behemoth kernel: ... APIC ARBPRI: 000000e0 (e0)
Jan 12 18:24:43 behemoth kernel: ... APIC PROCPRI: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC EOI: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC LDR: 01000000
Jan 12 18:24:43 behemoth kernel: ... APIC DFR: ffffffff
Jan 12 18:24:43 behemoth kernel: ... APIC SPIV: 000003ff
Jan 12 18:24:43 behemoth kernel: ... APIC ISR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 7 times
Jan 12 18:24:43 behemoth kernel: ... APIC TMR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 3 times
Jan 12 18:24:43 behemoth kernel: 00000000010000000000000001000000
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 2 times
Jan 12 18:24:43 behemoth kernel: ... APIC IRR field:
Jan 12 18:24:43 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth kernel: 00000000000000000100000000000000
Jan 12 18:24:43 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:24:43 behemoth last message repeated 4 times
Jan 12 18:24:43 behemoth kernel: 00000000000000010000000000000000
Jan 12 18:24:43 behemoth kernel: ... APIC ESR: 00000000
Jan 12 18:24:43 behemoth kernel: ... APIC ICR: 000c08fb
Jan 12 18:24:43 behemoth kernel: ... APIC ICR2: 02000000
Jan 12 18:24:43 behemoth kernel: ... APIC LVTT: 000200ef
Jan 12 18:24:43 behemoth kernel: ... APIC LVTPC: 00010000
Jan 12 18:24:43 behemoth kernel: ... APIC LVT0: 00010700
Jan 12 18:24:43 behemoth kernel: ... APIC LVT1: 00000400
Jan 12 18:24:43 behemoth kernel: ... APIC LVTERR: 000000fe
Jan 12 18:24:43 behemoth kernel: ... APIC TMICT: 0000a322
Jan 12 18:24:43 behemoth kernel: ... APIC TMCCT: 000041e1
Jan 12 18:24:43 behemoth kernel: ... APIC TDCR: 00000003


After network hang (nmi_watchdog=0)
===================================

Jan 12 18:26:21 behemoth kernel: SysRq:
Jan 12 18:26:21 behemoth kernel: print_PIC()
Jan 12 18:26:21 behemoth kernel:
Jan 12 18:26:21 behemoth kernel: printing PIC contents
Jan 12 18:26:21 behemoth kernel: ... PIC  IMR: fffa
Jan 12 18:26:21 behemoth kernel: ... PIC  IRR: 0000
Jan 12 18:26:21 behemoth kernel: ... PIC  ISR: 0000
Jan 12 18:26:21 behemoth kernel: ... PIC ELCR: 1e00
Jan 12 18:26:21 behemoth kernel: print_IO_APIC()
Jan 12 18:26:21 behemoth kernel: number of MP IRQ sources: 23.
Jan 12 18:26:21 behemoth kernel: number of IO-APIC #2 registers: 24.
Jan 12 18:26:21 behemoth kernel: testing the IO APIC.......................
Jan 12 18:26:21 behemoth kernel:
Jan 12 18:26:21 behemoth kernel: IO APIC #2......
Jan 12 18:26:21 behemoth kernel: .... register #00: 02000000
Jan 12 18:26:21 behemoth kernel: .......    : physical APIC id: 02
Jan 12 18:26:21 behemoth kernel: .... register #01: 00170011
Jan 12 18:26:21 behemoth kernel: .......     : max redirection entries: 0017
Jan 12 18:26:21 behemoth kernel: .......     : IO APIC version: 0011
Jan 12 18:26:21 behemoth kernel: .... register #02: 00000000
Jan 12 18:26:21 behemoth kernel: .......     : arbitration: 00
Jan 12 18:26:21 behemoth kernel: .... IRQ redirection table:
Jan 12 18:26:21 behemoth kernel:  NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
Jan 12 18:26:21 behemoth kernel:  00 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  01 003 03  0    0    0   0   0    1    1    39
Jan 12 18:26:21 behemoth kernel:  02 003 03  0    0    0   0   0    1    1    31
Jan 12 18:26:21 behemoth kernel:  03 003 03  0    0    0   0   0    1    1    41
Jan 12 18:26:21 behemoth kernel:  04 003 03  0    0    0   0   0    1    1    49
Jan 12 18:26:21 behemoth kernel:  05 003 03  0    0    0   0   0    1    1    51
Jan 12 18:26:21 behemoth kernel:  06 003 03  0    0    0   0   0    1    1    59
Jan 12 18:26:21 behemoth kernel:  07 003 03  0    0    0   0   0    1    1    61
Jan 12 18:26:21 behemoth kernel:  08 003 03  0    0    0   0   0    1    1    69
Jan 12 18:26:21 behemoth kernel:  09 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  0a 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  0b 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  0c 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  0d 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  0e 003 03  0    0    0   0   0    1    1    71
Jan 12 18:26:21 behemoth kernel:  0f 003 03  0    0    0   0   0    1    1    79
Jan 12 18:26:21 behemoth kernel:  10 003 03  0    1    0   1   0    1    1    81
Jan 12 18:26:21 behemoth kernel:  11 003 03  0    1    0   1   0    1    1    89
Jan 12 18:26:21 behemoth kernel:  12 003 03  0    1    0   1   0    1    1    91
Jan 12 18:26:21 behemoth kernel:  13 003 03  0    1    1   1   0    1    1    99
Jan 12 18:26:21 behemoth kernel:  14 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  15 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  16 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel:  17 000 00  1    0    0   0   0    0    0    00
Jan 12 18:26:21 behemoth kernel: IRQ to pin mappings:
Jan 12 18:26:21 behemoth kernel: IRQ0 -> 2
Jan 12 18:26:21 behemoth kernel: IRQ1 -> 1
Jan 12 18:26:21 behemoth kernel: IRQ3 -> 3
Jan 12 18:26:21 behemoth kernel: IRQ4 -> 4
Jan 12 18:26:21 behemoth kernel: IRQ5 -> 5
Jan 12 18:26:21 behemoth kernel: IRQ6 -> 6
Jan 12 18:26:21 behemoth kernel: IRQ7 -> 7
Jan 12 18:26:21 behemoth kernel: IRQ8 -> 8
Jan 12 18:26:21 behemoth kernel: IRQ13 -> 13
Jan 12 18:26:21 behemoth kernel: IRQ14 -> 14
Jan 12 18:26:21 behemoth kernel: IRQ15 -> 15
Jan 12 18:26:21 behemoth kernel: IRQ16 -> 16
Jan 12 18:26:21 behemoth kernel: IRQ17 -> 17
Jan 12 18:26:21 behemoth kernel: IRQ18 -> 18
Jan 12 18:26:21 behemoth kernel: IRQ19 -> 19
Jan 12 18:26:21 behemoth kernel: .................................... done.
Jan 12 18:26:21 behemoth kernel: print_all_local_APICs()
Jan 12 18:26:21 behemoth kernel:
Jan 12 18:26:21 behemoth kernel: printing local APIC contents on CPU#1/1:
Jan 12 18:26:21 behemoth kernel: ... APIC ID:      01000000 (1)
Jan 12 18:26:21 behemoth kernel: ... APIC VERSION: 00040011
Jan 12 18:26:21 behemoth kernel: ... APIC TASKPRI: 00000000 (00)
Jan 12 18:26:21 behemoth kernel: ... APIC ARBPRI: 00000000 (00)
Jan 12 18:26:21 behemoth kernel: ... APIC PROCPRI: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC EOI: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC LDR: 02000000
Jan 12 18:26:21 behemoth kernel: ... APIC DFR: ffffffff
Jan 12 18:26:21 behemoth kernel: ... APIC SPIV: 000003ff
Jan 12 18:26:21 behemoth kernel: ... APIC ISR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 7 times
Jan 12 18:26:21 behemoth kernel: ... APIC TMR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 3 times
Jan 12 18:26:21 behemoth kernel: 00000000010000000000000000000000
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 2 times
Jan 12 18:26:21 behemoth kernel: ... APIC IRR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 7 times
Jan 12 18:26:21 behemoth kernel: ... APIC ESR: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC ICR: 000008fc
Jan 12 18:26:21 behemoth kernel: ... APIC ICR2: 01000000
Jan 12 18:26:21 behemoth kernel: ... APIC LVTT: 000200ef
Jan 12 18:26:21 behemoth kernel: ... APIC LVTPC: 00010000
Jan 12 18:26:21 behemoth kernel: ... APIC LVT0: 00010700
Jan 12 18:26:21 behemoth kernel: ... APIC LVT1: 00010400
Jan 12 18:26:21 behemoth kernel: ... APIC LVTERR: 000000fe
Jan 12 18:26:21 behemoth kernel: ... APIC TMICT: 0000a322
Jan 12 18:26:21 behemoth kernel: ... APIC TMCCT: 00001803
Jan 12 18:26:21 behemoth kernel: ... APIC TDCR: 00000003
Jan 12 18:26:21 behemoth kernel:
Jan 12 18:26:21 behemoth kernel:
Jan 12 18:26:21 behemoth kernel: printing local APIC contents on CPU#0/0:
Jan 12 18:26:21 behemoth kernel: ... APIC ID:      00000000 (0)
Jan 12 18:26:21 behemoth kernel: ... APIC VERSION: 00040011
Jan 12 18:26:21 behemoth kernel: ... APIC TASKPRI: 00000000 (00)
Jan 12 18:26:21 behemoth kernel: ... APIC ARBPRI: 000000e0 (e0)
Jan 12 18:26:21 behemoth kernel: ... APIC PROCPRI: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC EOI: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC LDR: 01000000
Jan 12 18:26:21 behemoth kernel: ... APIC DFR: ffffffff
Jan 12 18:26:21 behemoth kernel: ... APIC SPIV: 000003ff
Jan 12 18:26:21 behemoth kernel: ... APIC ISR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 7 times
Jan 12 18:26:21 behemoth kernel: ... APIC TMR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 3 times
Jan 12 18:26:21 behemoth kernel: 00000000010000000000000001000000
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 2 times
Jan 12 18:26:21 behemoth kernel: ... APIC IRR field:
Jan 12 18:26:21 behemoth kernel: 0123456789abcdef0123456789abcdef
Jan 12 18:26:21 behemoth kernel: 00000000000000000000000000000000
Jan 12 18:26:21 behemoth last message repeated 6 times
Jan 12 18:26:21 behemoth kernel: 00000000000000010000000000000000
Jan 12 18:26:21 behemoth kernel: ... APIC ESR: 00000000
Jan 12 18:26:21 behemoth kernel: ... APIC ICR: 000c08fb
Jan 12 18:26:21 behemoth kernel: ... APIC ICR2: 02000000
Jan 12 18:26:21 behemoth kernel: ... APIC LVTT: 000200ef
Jan 12 18:26:21 behemoth kernel: ... APIC LVTPC: 00010000
Jan 12 18:26:21 behemoth kernel: ... APIC LVT0: 00010700
Jan 12 18:26:21 behemoth kernel: ... APIC LVT1: 00000400
Jan 12 18:26:21 behemoth kernel: ... APIC LVTERR: 000000fe
Jan 12 18:26:21 behemoth kernel: ... APIC TMICT: 0000a322
Jan 12 18:26:21 behemoth kernel: ... APIC TMCCT: 00004e26
Jan 12 18:26:21 behemoth kernel: ... APIC TDCR: 00000003

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 17:16 QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Manfred Spraul
  2001-01-12 17:33 ` Frank de Lange
@ 2001-01-12 17:49 ` Alan Cox
  2001-01-12 18:08   ` Manfred Spraul
  2001-01-12 22:03   ` Latest status of IDE patches from Andre Jeff Nguyen
  1 sibling, 2 replies; 71+ messages in thread
From: Alan Cox @ 2001-01-12 17:49 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel, frank

> Frank, could you try what happens with the NMI oopser disabled?
> 
> The second major difference I'm immediately aware of is the number of
> the reschedule/tlb flush/etc interrupt: 2.2 uses the lowest priority,
> 2.4 the highest priority.

Im trying to remember what they were, but some APIC versions do have errata
and someting about 3 irqs at the same priority level rings a bell.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware  related?
  2001-01-12 17:33 ` Frank de Lange
@ 2001-01-12 17:51   ` Manfred Spraul
  2001-01-12 18:25     ` Frank de Lange
  0 siblings, 1 reply; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 17:51 UTC (permalink / raw)
  To: Frank de Lange; +Cc: dwmw2, linux-kernel

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

Frank de Lange wrote:
> 
> On Fri, Jan 12, 2001 at 06:16:36PM +0100, Manfred Spraul wrote:
> > I would first concentrate on the differences between 2.2 and 2.4:
> >
> > Frank, could you try what happens with the NMI oopser disabled?
> 
> Here's the results with nmi_watchdog=0
> 
> 
> After network hang (nmi_watchdog=0)
> ===================================
> 

It still hangs.

Frank, I've attached a proposed kick_IOAPIC pin. Could you try it?
I'm rebooting with that patch right now.
--
	Manfred

[-- Attachment #2: patch-frank --]
[-- Type: text/plain, Size: 1629 bytes --]

1) add to the end of io_apic.c:

static void print_line(struct IO_APIC_route_entry* entry)
{
	printk(KERN_EMERG " %02x %03X %02X  ",
			0,
			entry->dest.logical.logical_dest,
			entry->dest.physical.physical_dest
		);

	printk("%1d    %1d    %1d   %1d   %1d    %1d    %1d    %02X\n",
			entry->mask,
			entry->trigger,
			entry->irr,
			entry->polarity,
			entry->delivery_status,
			entry->dest_mode,
			entry->delivery_mode,
			entry->vector
		);
}

void kick_IOAPIC_pin(int pin)
{
    	unsigned long flags;
	struct IO_APIC_route_entry entry;

	local_irq_save(flags);

	*(((int *)&entry) + 1) = io_apic_read(0, 0x11 + 2 * pin);
	*(((int *)&entry) + 0) = io_apic_read(0, 0x10 + 2 * pin);

	printk(KERN_EMERG " NR Log Phy Mask Trig IRR Pol"
			  " Stat Dest Deli Vect:   \n");
	printk(KERN_EMERG "Before:\n");
	print_line(&entry);

	entry.trigger = 0;
	io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry) + 1));
	io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry) + 0));
	udelay(10);
	printk(KERN_EMERG "After switching to edge:\n");
	print_line(&entry);

	entry.trigger = 1;
	io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry) + 1));
	io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry) + 0));
	udelay(10);
	printk(KERN_EMERG "After switch back:\n");
	print_line(&entry);

	local_irq_restore(flags);
}

2) add to sysrq.c:
--- 2.4/drivers/char/sysrq.c	Mon Dec  4 02:48:19 2000
+++ build-2.4/drivers/char/sysrq.c	Fri Jan 12 18:37:57 2001
@@ -137,6 +137,9 @@
 		send_sig_all(SIGKILL, 1);
 		orig_log_level = 8;
 		break;
+	case 'q':
+		kick_IOAPIC_pin(19);
+
 	default:					    /* Unknown: help */
 		if (kbd)
 			printk("unRaw ");

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 17:49 ` Alan Cox
@ 2001-01-12 18:08   ` Manfred Spraul
  2001-01-12 18:16     ` Ingo Molnar
                       ` (2 more replies)
  2001-01-12 22:03   ` Latest status of IDE patches from Andre Jeff Nguyen
  1 sibling, 3 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 18:08 UTC (permalink / raw)
  To: Alan Cox; +Cc: dwmw2, linux-kernel, frank

Alan Cox wrote:
> 
> > Frank, could you try what happens with the NMI oopser disabled?
> >
> > The second major difference I'm immediately aware of is the number of
> > the reschedule/tlb flush/etc interrupt: 2.2 uses the lowest priority,
> > 2.4 the highest priority.
> 
> Im trying to remember what they were, but some APIC versions do have errata
> and someting about 3 irqs at the same priority level rings a bell.

The PPro local apic documentation says:
<<<<<<<
The processor's local APIC includes an in-service entry and a holding
entry for each priority level. To avoid losing interrupts, software
should allocate no more than 2 interrupt vectors per priority.
>>>>>>>>

Ok, we must reorder the vector numbers for our own interrupts
(0xfb-0xff), but that doesn't explain our problems: we don't loose
reschedule interrupts, we have problems with normal interrupts - and
there we only use 2 irq at the same priority level.

Btw, the kick patch I sent a few minutes ago revives my io apic.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:08   ` Manfred Spraul
@ 2001-01-12 18:16     ` Ingo Molnar
  2001-01-12 18:45       ` Manfred Spraul
  2001-01-12 18:28     ` Linus Torvalds
  2001-01-12 19:05     ` Frank de Lange
  2 siblings, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 18:16 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Alan Cox, dwmw2, Linux Kernel List, frank


On Fri, 12 Jan 2001, Manfred Spraul wrote:

> The PPro local apic documentation says:
> <<<<<<<
> The processor's local APIC includes an in-service entry and a holding
> entry for each priority level. To avoid losing interrupts, software
> should allocate no more than 2 interrupt vectors per priority.
> >>>>>>>>
>
> Ok, we must reorder the vector numbers for our own interrupts
> (0xfb-0xff), but that doesn't explain our problems: we don't loose
> reschedule interrupts, we have problems with normal interrupts - and
> there we only use 2 irq at the same priority level.

we *already* reorder vector numbers and spread them out as much as
possible. We do this in 2.2 as well. We did this almost from day 1 of
IO-APIC support. If any manually allocated IRQ vector creates a '3 vectors
in the same 16-vector region' situation then thats a bug in hw_irq.h..

the 'loss of interrupts' above does not include external interrupts, only
local interrupts (such as the APIC timer interrupt) can get lost in such a
situation.

(nevertheless there is something going on.)

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 17:51   ` Manfred Spraul
@ 2001-01-12 18:25     ` Frank de Lange
  2001-01-12 19:04       ` Manfred Spraul
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 18:25 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel

On Fri, Jan 12, 2001 at 06:51:36PM +0100, Manfred Spraul wrote:
> Frank, I've attached a proposed kick_IOAPIC pin. Could you try it?
> I'm rebooting with that patch right now.

I added the patch, and tried it out. When the network hangs, I am able to revive it with ALT-SYSRQ-Q. The debug log shows these entries:

Jan 12 19:22:57 behemoth kernel: SysRq: <0> NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
Jan 12 19:22:57 behemoth kernel: Before:
Jan 12 19:22:57 behemoth kernel:  00 003 03  0    1    1   1   1    1    1    99
Jan 12 19:22:57 behemoth kernel: After switching to edge:
Jan 12 19:22:57 behemoth kernel:  00 003 03  0    0    1   1   1    1    1    99
Jan 12 19:22:57 behemoth kernel: After switch back:
Jan 12 19:22:57 behemoth kernel:  00 003 03  0    1    1   1   1    1    1    99

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:08   ` Manfred Spraul
  2001-01-12 18:16     ` Ingo Molnar
@ 2001-01-12 18:28     ` Linus Torvalds
  2001-01-12 23:27       ` Alan Cox
  2001-01-12 19:05     ` Frank de Lange
  2 siblings, 1 reply; 71+ messages in thread
From: Linus Torvalds @ 2001-01-12 18:28 UTC (permalink / raw)
  To: linux-kernel

In article <3A5F4827.2E443786@colorfullife.com>,
Manfred Spraul  <manfred@colorfullife.com> wrote:
>The processor's local APIC includes an in-service entry and a holding
>entry for each priority level. To avoid losing interrupts, software
>should allocate no more than 2 interrupt vectors per priority.
>>>>>>>>>
>
>Ok, we must reorder the vector numbers for our own interrupts
>(0xfb-0xff), but that doesn't explain our problems: we don't loose
>reschedule interrupts, we have problems with normal interrupts - and
>there we only use 2 irq at the same priority level.
>
>Btw, the kick patch I sent a few minutes ago revives my io apic.

Does this seem to happen mainly with drivers that use "disable_irq()"
and "enable_irq()"? I know the ne drivers do (through the 8390 module),
and some others do too (3c59x). 

"disable_irq()"/"enable_irq()" has always tended to be slightly
problematic.  It's not a set of semantics that maps well onto all
interrupt controllers (io-apic definitely included).  Drivers would
generally be better off if they disabled their own chip from sending
interrupts, rather than disabling the interrupt line the chip is on. 

(Of course, most drivers would be even _better_ off if they didn't play
games with irq disabling at all, but I think the 8390 driver does it
because otherwise it would suck too badly for words). 

If you are seeing this with a 8390 core, try to see if the problem goes
away if you remove the "disable_irq_nosync(dev->irq);" and
"enable_irq()" thing (which means that you need to change the
spinlocking at the same place to use irq-safe versions - this _will_
make for bad interrupt latency especially with ISA ne2000 cards, but it
would be interesting to hear if it makes the problem less likely to
happen). 

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:16     ` Ingo Molnar
@ 2001-01-12 18:45       ` Manfred Spraul
  2001-01-12 18:48         ` Ingo Molnar
  0 siblings, 1 reply; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 18:45 UTC (permalink / raw)
  To: mingo; +Cc: Alan Cox, dwmw2, Linux Kernel List, frank

Ingo Molnar wrote:
> 
> we *already* reorder vector numbers and spread them out as much as
> possible. We do this in 2.2 as well. We did this almost from day 1 of
> IO-APIC support. If any manually allocated IRQ vector creates a '3 vectors
> in the same 16-vector region' situation then thats a bug in hw_irq.h..
> 
I reread the 2.2 and 2.4 code:

2.2 spreads all vectors, even the internal interrupts (tlb flush,
reschedule, timer, call function) are spread.
Hmm. AFAICS there is one bug: 3 interrupts are in priority 5:

CALL_FUNCTION_VECTOR	0x50
IRQ0_TRAP_VECTOR	0x51
irq1: irq0+8		0x59

check arch/i386/kernel/irq.h and assign_irq_vector (io_apic.c)

2.4 spreads the vectors for the external (hardware, from io apic)
interrupts, but 5 ipi vectors have the same priority: reschedule, call
function, tlb invalidate, apic error, spurious interrupt.

But that doesn't explain what happens with ne2k cards: neither 2.2 nor
2.4 have more than 2 interrupts in class for the hardware interrupt
16/19.
With 2.2 I don't have any problems, 2.4 hangs.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:45       ` Manfred Spraul
@ 2001-01-12 18:48         ` Ingo Molnar
  0 siblings, 0 replies; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 18:48 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Alan Cox, dwmw2, Linux Kernel List, frank


On Fri, 12 Jan 2001, Manfred Spraul wrote:

> 2.4 spreads the vectors for the external (hardware, from io apic)
> interrupts, but 5 ipi vectors have the same priority: reschedule, call
> function, tlb invalidate, apic error, spurious interrupt.

my reading of the errata is that the lost APIC timer IRQ happens only if
the APIC timer IRQ vector's priority level has more than 2 active vectors.
It's a very limited case, which does not happen in recent CPUs anyway
(such as the PIII).

> But that doesn't explain what happens with ne2k cards: neither 2.2 nor
> 2.4 have more than 2 interrupts in class for the hardware interrupt
> 16/19.

yep.

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware  related?
  2001-01-12 18:25     ` Frank de Lange
@ 2001-01-12 19:04       ` Manfred Spraul
  2001-01-12 19:07         ` Frank de Lange
  2001-01-12 19:21         ` Frank de Lange
  0 siblings, 2 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 19:04 UTC (permalink / raw)
  To: Frank de Lange; +Cc: dwmw2, linux-kernel, mingo, Alan Cox, torvalds

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

Linus wrote:
> Does this seem to happen mainly with drivers that use "disable_irq()" 
> and "enable_irq()"? I know the ne drivers do (through the 8390 module), 
> and some others do too (3c59x). 

I removed the disable_irq lines from 8390.c, and that fixed the problem:
no hang within 2 minutes - the test is still running.

Frank, could you double check it?

--
	Manfred

[-- Attachment #2: patch-frank --]
[-- Type: text/plain, Size: 1620 bytes --]

// $Header$
// Kernel Version:
//  VERSION = 2
//  PATCHLEVEL = 4
//  SUBLEVEL = 0
//  EXTRAVERSION =
--- 2.4/drivers/net/8390.c	Thu Jan  4 22:00:55 2001
+++ build-2.4/drivers/net/8390.c	Fri Jan 12 19:53:47 2001
@@ -242,15 +242,15 @@
 
 	/* Ugly but a reset can be slow, yet must be protected */
 		
-	disable_irq_nosync(dev->irq);
-	spin_lock(&ei_local->page_lock);
+/*	disable_irq_nosync(dev->irq);*/
+	spin_lock_irqsave(&ei_local->page_lock, flags);
 		
 	/* Try to restart the card.  Perhaps the user has fixed something. */
 	ei_reset_8390(dev);
 	NS8390_init(dev, 1);
 		
-	spin_unlock(&ei_local->page_lock);
-	enable_irq(dev->irq);
+	spin_unlock_irqrestore(&ei_local->page_lock, flags);
+/*	enable_irq(dev->irq); */
 	netif_wake_queue(dev);
 }
     
@@ -285,9 +285,9 @@
 	 *	Slow phase with lock held.
 	 */
 	 
-	disable_irq_nosync(dev->irq);
+/*	disable_irq_nosync(dev->irq);*/
 	
-	spin_lock(&ei_local->page_lock);
+	spin_lock_irqsave(&ei_local->page_lock, flags);
 	
 	ei_local->irqlock = 1;
 
@@ -327,8 +327,8 @@
 		ei_local->irqlock = 0;
 		netif_stop_queue(dev);
 		outb_p(ENISR_ALL, e8390_base + EN0_IMR);
-		spin_unlock(&ei_local->page_lock);
-		enable_irq(dev->irq);
+		spin_unlock_irqrestore(&ei_local->page_lock, flags);
+/*		enable_irq(dev->irq);*/
 		ei_local->stat.tx_errors++;
 		return 1;
 	}
@@ -383,8 +383,8 @@
 	ei_local->irqlock = 0;
 	outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 	
-	spin_unlock(&ei_local->page_lock);
-	enable_irq(dev->irq);
+	spin_unlock_irqrestore(&ei_local->page_lock, flags);
+/*	enable_irq(dev->irq); */
 
 	dev_kfree_skb (skb);
 	ei_local->stat.tx_bytes += send_length;

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:08   ` Manfred Spraul
  2001-01-12 18:16     ` Ingo Molnar
  2001-01-12 18:28     ` Linus Torvalds
@ 2001-01-12 19:05     ` Frank de Lange
  2001-01-12 20:04       ` Linus Torvalds
  2 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 19:05 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Alan Cox, dwmw2, linux-kernel

As per Linus' suggestion, I removed the disable_irq/enable_irq statements from
the 8390 core driver, and replace the spinlocks with irq-safe versions. This
seems to solve the network hangs, as I am currently running a heavy network
load (which would have killed a non-patched driver within seconds). Network
latency seems a bit higher, and there are some hiccups in the streaming audio
(part of the network load, easy indicator of performance...), but no hangs.
Here's the patch:

--- linux/drivers/net/8390.c.org	Fri Jan 12 19:52:38 2001
+++ linux/drivers/net/8390.c	Fri Jan 12 19:54:50 2001
@@ -242,15 +242,15 @@
 
 	/* Ugly but a reset can be slow, yet must be protected */
 		
-	disable_irq_nosync(dev->irq);
-	spin_lock(&ei_local->page_lock);
+	/* disable_irq_nosync(dev->irq); */
+	spin_lock_irq(&ei_local->page_lock);
 		
 	/* Try to restart the card.  Perhaps the user has fixed something. */
 	ei_reset_8390(dev);
 	NS8390_init(dev, 1);
 		
-	spin_unlock(&ei_local->page_lock);
-	enable_irq(dev->irq);
+	spin_unlock_irq(&ei_local->page_lock);
+	/* enable_irq(dev->irq); */
 	netif_wake_queue(dev);
 }
     
@@ -285,9 +285,9 @@
 	 *	Slow phase with lock held.
 	 */
 	 
-	disable_irq_nosync(dev->irq);
+	/* disable_irq_nosync(dev->irq); */
 	
-	spin_lock(&ei_local->page_lock);
+	spin_lock_irq(&ei_local->page_lock);
 	
 	ei_local->irqlock = 1;
 
@@ -383,8 +383,8 @@
 	ei_local->irqlock = 0;
 	outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 	
-	spin_unlock(&ei_local->page_lock);
-	enable_irq(dev->irq);
+	spin_unlock_irq(&ei_local->page_lock);
+	/* enable_irq(dev->irq); */
 
 	dev_kfree_skb (skb);
 	ei_local->stat.tx_bytes += send_length;

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:04       ` Manfred Spraul
@ 2001-01-12 19:07         ` Frank de Lange
  2001-01-12 19:21         ` Frank de Lange
  1 sibling, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 19:07 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel, mingo, Alan Cox, torvalds

On Fri, Jan 12, 2001 at 08:04:24PM +0100, Manfred Spraul wrote:
> Linus wrote:
> > Does this seem to happen mainly with drivers that use "disable_irq()" 
> > and "enable_irq()"? I know the ne drivers do (through the 8390 module), 
> > and some others do too (3c59x). 
> 
> I removed the disable_irq lines from 8390.c, and that fixed the problem:
> no hang within 2 minutes - the test is still running.
> 
> Frank, could you double check it?

Hm, I also sent in a (somewhat different) patch on my own... :-)]

Anyway, still running under heavy load...

Cheers//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:04       ` Manfred Spraul
  2001-01-12 19:07         ` Frank de Lange
@ 2001-01-12 19:21         ` Frank de Lange
  2001-01-12 19:33           ` Manfred Spraul
  1 sibling, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 19:21 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel, mingo, Alan Cox, torvalds

On Fri, Jan 12, 2001 at 08:04:24PM +0100, Manfred Spraul wrote:
> I removed the disable_irq lines from 8390.c, and that fixed the problem:
> no hang within 2 minutes - the test is still running.
> 
> Frank, could you double check it?

I'm currently running my own patched version, which uses
spin_lock_irq/spin_unlock_irq instead of
spin_lock_irqsave/spin_unlock_irqrestore like you patch uses. Looking at
spinlock.h, spin_lock_irq does a local irq disable, which seems to be closer to
the original intent (disable_irq) than spin_lock_irqsave. Anyone want to
comment on this?

Anyway, still running under load, also got USB (which uses the same irq) to
produce some interrupts by scanning some stuff. No problems so far...

Cheers//Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware  related?
  2001-01-12 19:21         ` Frank de Lange
@ 2001-01-12 19:33           ` Manfred Spraul
  2001-01-12 19:52             ` Frank de Lange
  2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
  0 siblings, 2 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 19:33 UTC (permalink / raw)
  To: Frank de Lange; +Cc: dwmw2, linux-kernel, mingo, Alan Cox, torvalds

Frank de Lange wrote:
> 
> On Fri, Jan 12, 2001 at 08:04:24PM +0100, Manfred Spraul wrote:
> > I removed the disable_irq lines from 8390.c, and that fixed the problem:
> > no hang within 2 minutes - the test is still running.
> >
> > Frank, could you double check it?
> 
> I'm currently running my own patched version, which uses
> spin_lock_irq/spin_unlock_irq instead of
> spin_lock_irqsave/spin_unlock_irqrestore like you patch uses. Looking at
> spinlock.h, spin_lock_irq does a local irq disable, which seems to be closer to
> the original intent (disable_irq) than spin_lock_irqsave. Anyone want to
> comment on this?
> 
It's a bit dangerous: _if_ one of the function is called with disabled
local interrupts, then spin_unlock_irq would enable these interrupts.
That could cause other problems, but I haven't checked if these function
are actually called with disabled interrupts - e.g. the transmit
function is called with enabled interrupts.

Frank, the 2.4.0 contains 2 band aids that were added for ne2k smp:

* From Ingo: focus cpu disabled, in arch/i386/kernel/apic.c
* From myself: TARGET_CPU = cpu_online_mask, was 0xFF.

Could you disable both bandaids? I disabled them, no problems so far.

Now back to the disable_irq_nosync().
--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:33           ` Manfred Spraul
@ 2001-01-12 19:52             ` Frank de Lange
  2001-01-12 19:59               ` Linus Torvalds
  2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
  1 sibling, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 19:52 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: dwmw2, linux-kernel, mingo, Alan Cox, torvalds

On Fri, Jan 12, 2001 at 08:33:15PM +0100, Manfred Spraul wrote:
> Frank, the 2.4.0 contains 2 band aids that were added for ne2k smp:
> 
> * From Ingo: focus cpu disabled, in arch/i386/kernel/apic.c
> * From myself: TARGET_CPU = cpu_online_mask, was 0xFF.
> 
> Could you disable both bandaids? I disabled them, no problems so far.

I disabled both (I guess you meant the 'define TARGET_CPUS cpu_online' in
io_apic.c?), and reverted my own patch, added your patch... Now running with
the usual heavy network load, no problems so far... Also made USB produce
interrupts (shares irq with network), no problems...

Could this really be the solution?

Cheers//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:52             ` Frank de Lange
@ 2001-01-12 19:59               ` Linus Torvalds
  2001-01-12 20:03                 ` Ingo Molnar
                                   ` (3 more replies)
  0 siblings, 4 replies; 71+ messages in thread
From: Linus Torvalds @ 2001-01-12 19:59 UTC (permalink / raw)
  To: Frank de Lange; +Cc: Manfred Spraul, dwmw2, linux-kernel, mingo, Alan Cox



On Fri, 12 Jan 2001, Frank de Lange wrote:

> On Fri, Jan 12, 2001 at 08:33:15PM +0100, Manfred Spraul wrote:
> > Frank, the 2.4.0 contains 2 band aids that were added for ne2k smp:
> > 
> > * From Ingo: focus cpu disabled, in arch/i386/kernel/apic.c
> > * From myself: TARGET_CPU = cpu_online_mask, was 0xFF.
> > 
> > Could you disable both bandaids? I disabled them, no problems so far.
> 
> I disabled both (I guess you meant the 'define TARGET_CPUS cpu_online' in
> io_apic.c?), and reverted my own patch, added your patch... Now running with
> the usual heavy network load, no problems so far... Also made USB produce
> interrupts (shares irq with network), no problems...
> 
> Could this really be the solution?

I'd like to know _which_ of the two makes a difference (or does it only
trigger with both of them enabled)? And even then I'm not sure that it is
"the" solution - both changes to io-apic handling had some reason for
them. Ingo, what was the focus-cpu thing?

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:59               ` Linus Torvalds
@ 2001-01-12 20:03                 ` Ingo Molnar
  2001-01-14  0:13                   ` Roeland Th. Jansen
  2001-01-12 20:05                 ` Frank de Lange
                                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:03 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Frank de Lange, Manfred Spraul, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Linus Torvalds wrote:

> [...] Ingo, what was the focus-cpu thing?

well, some time ago i had an ne2k card in an SMP system as well, and found
this very problem. Disabling/enabling focus-cpu appeared to make a
difference, but later on i made experiments that show that in both cases
the hang happens. I spent a good deal of time trying to fix this problem,
but failed - so any fresh ideas are more than welcome.

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 19:05     ` Frank de Lange
@ 2001-01-12 20:04       ` Linus Torvalds
  2001-01-15 14:36         ` Roeland Th. Jansen
  0 siblings, 1 reply; 71+ messages in thread
From: Linus Torvalds @ 2001-01-12 20:04 UTC (permalink / raw)
  To: linux-kernel

In article <20010112200541.A25675@unternet.org>,
Frank de Lange  <frank@unternet.org> wrote:
>As per Linus' suggestion, I removed the disable_irq/enable_irq statements from
>the 8390 core driver, and replace the spinlocks with irq-safe versions. This
>seems to solve the network hangs, as I am currently running a heavy network
>load (which would have killed a non-patched driver within seconds). Network
>latency seems a bit higher, and there are some hiccups in the streaming audio
>(part of the network load, easy indicator of performance...), but no hangs.

Ok, so it's tentatively the IOAPIC disable/enable code.  But it could
obviously be something that just interacts with it, including just a
timing issue (ie the _real_ bug might just be bad behaviour when
changing IO-APIC state at the same time as an interrupt happens, and
disable/enable-irq just happen to be the only things that do it at a
high enough frequency that you can see the problem). 

Remind me: what polarity are your io-apic irq's? Level, edge, sideways?
Anything else that might be relevant?

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:59               ` Linus Torvalds
  2001-01-12 20:03                 ` Ingo Molnar
@ 2001-01-12 20:05                 ` Frank de Lange
  2001-01-12 20:11                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Manfred Spraul
  2001-01-12 21:21                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Frank de Lange
  3 siblings, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:05 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Manfred Spraul, dwmw2, linux-kernel, mingo, Alan Cox

On Fri, Jan 12, 2001 at 11:59:25AM -0800, Linus Torvalds wrote:
> > Could this really be the solution?
> 
> I'd like to know _which_ of the two makes a difference (or does it only
> trigger with both of them enabled)? And even then I'm not sure that it is
> "the" solution - both changes to io-apic handling had some reason for
> them. Ingo, what was the focus-cpu thing?

Well, with 'this' (in 'could THIS be') I really meant the move from disable_irq
to the irq_safe spinlocks. I'm currently running with the patched 8390.c
driver, patched io_apic (TARGET_CPUS 0xff) and patched apic.c (focus cpu
enabled), and have had no problems yet... even though I'm running several
simulatnsous nfs cp -rd <big_dir>, streaming network audio, scanning with an
USB scanner, etc.

So far, it seems that the patch to 8390.c removed the symptoms. The changes to
apic.c and io_apic.c did not make the network hang come back. 

Cheers//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 19:59               ` Linus Torvalds
  2001-01-12 20:03                 ` Ingo Molnar
  2001-01-12 20:05                 ` Frank de Lange
@ 2001-01-12 20:11                 ` Manfred Spraul
  2001-01-12 20:16                   ` Frank de Lange
  2001-01-12 21:21                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Frank de Lange
  3 siblings, 1 reply; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 20:11 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Frank de Lange, dwmw2, linux-kernel, mingo, Alan Cox

Linus Torvalds wrote:
> 
> 
> I'd like to know _which_ of the two makes a difference (or does it only
> trigger with both of them enabled)? And even then I'm not sure that it is
> "the" solution - both changes to io-apic handling had some reason for
> them. Ingo, what was the focus-cpu thing?
> 

Frank, please clarify:
you still run without disable_irq_nosync() in 8390.c?

I have a first idea: we send an EOI to an interrupt that is masked on
the IO apic, perhaps that causes the problems.

I'm right now typing a patch.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:11                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Manfred Spraul
@ 2001-01-12 20:16                   ` Frank de Lange
  2001-01-12 20:19                     ` Ingo Molnar
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:16 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Linus Torvalds, dwmw2, linux-kernel, mingo, Alan Cox

On Fri, Jan 12, 2001 at 09:11:29PM +0100, Manfred Spraul wrote:
> Frank, please clarify:
> you still run without disable_irq_nosync() in 8390.c?

I am running with your patched version of 8390.c (so WITHOUT
disable_irq_nosync()).

In addition, I patched apic.c (focus cpu enabled)
In addition, I patched io_apic ((TARGET_CPUS 0xff)

> I have a first idea: we send an EOI to an interrupt that is masked on
> the IO apic, perhaps that causes the problems.

Sound plausible...

> I'm right now typing a patch.

I'll await yours instead of making my own patch this time... :-)

Cheers//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:16                   ` Frank de Lange
@ 2001-01-12 20:19                     ` Ingo Molnar
  2001-01-12 20:26                       ` Frank de Lange
  0 siblings, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:19 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Frank de Lange wrote:

> In addition, I patched apic.c (focus cpu enabled)
> In addition, I patched io_apic ((TARGET_CPUS 0xff)

please try it with the focus CPU enabling change (we want to enable that
feature, i only disabled it due to the stuck-ne2k bug), but with
TARGET_CPUS set to cpu_online_mask. (this later is needed for certain
crappy BIOSes.)

i believe the ne2k driver change is the key.

> > I have a first idea: we send an EOI to an interrupt that is masked on
> > the IO apic, perhaps that causes the problems.
>
> Sound plausible...

does not help. I've tried it (and many other combinations). I did not find
any direct workaround for this problem. (i tried very hard.)

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:19                     ` Ingo Molnar
@ 2001-01-12 20:26                       ` Frank de Lange
  2001-01-12 20:31                         ` Ingo Molnar
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:26 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:19:53PM +0100, Ingo Molnar wrote:
> > In addition, I patched apic.c (focus cpu enabled)
> > In addition, I patched io_apic ((TARGET_CPUS 0xff)
> 
> please try it with the focus CPU enabling change (we want to enable that
> feature, i only disabled it due to the stuck-ne2k bug), but with
> TARGET_CPUS set to cpu_online_mask. (this later is needed for certain
> crappy BIOSes.)

WITH or WITHOUT the changed 8390 driver? I can already give you the results for
running WITH the changed driver: it works. I have not yet tried it WITHOUT the
changed 8390 driver (so that would be stock 8390, patched apic.c, stock
io_apic.c). Please let me know which you want...

Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:26                       ` Frank de Lange
@ 2001-01-12 20:31                         ` Ingo Molnar
  2001-01-12 20:35                           ` Frank de Lange
  2001-01-12 23:50                           ` Alan Cox
  0 siblings, 2 replies; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:31 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Frank de Lange wrote:

> WITH or WITHOUT the changed 8390 driver? I can already give you the
> results for running WITH the changed driver: it works. I have not yet
> tried it WITHOUT the changed 8390 driver (so that would be stock 8390,
> patched apic.c, stock io_apic.c). Please let me know which you want...

WITH. patched 8390.c, patched apic.c, sock io_apic.c. My very strong
feeling is that this will be a stable combination, and that this is what
we want as a final solution.

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
       [not found] <20010112213217.E26555@unternet.org>
@ 2001-01-12 20:34 ` Ingo Molnar
  2001-01-12 20:39   ` Frank de Lange
  0 siblings, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:34 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Frank de Lange wrote:

> BTW, does this (TARGET_CPUS cpu_online_mask) not wreak havoc with
> systems with hot-pluggable CPUs (many Suns, etc...)? Wouldn;t it be
> better to make this a config option (like the optional PCI fixes for
> crappy BIOSs)?

? this is x86-only code. There is no hot-pluggable CPU support for Linux
AFAIK. (But in any case, the code is basically ready for hot-pluggable
CPUs, just take a few precautions and change cpu_online_mask and a couple
of other things.)

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:31                         ` Ingo Molnar
@ 2001-01-12 20:35                           ` Frank de Lange
  2001-01-12 20:37                             ` Ingo Molnar
  2001-01-12 23:50                           ` Alan Cox
  1 sibling, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:35 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:31:15PM +0100, Ingo Molnar wrote:
> 
> On Fri, 12 Jan 2001, Frank de Lange wrote:
> 
> > WITH or WITHOUT the changed 8390 driver? I can already give you the
> > results for running WITH the changed driver: it works. I have not yet
> > tried it WITHOUT the changed 8390 driver (so that would be stock 8390,
> > patched apic.c, stock io_apic.c). Please let me know which you want...
> 
> WITH. patched 8390.c, patched apic.c, sock io_apic.c. My very strong
> feeling is that this will be a stable combination, and that this is what
> we want as a final solution.

It is. As I already mentioned in other messages, I already tested with JUST the
patched 8390.c driver, no other patches. It was stable. I then patched apic.c
AND io_apic.c, which did not introduce new instabilities. Unless you think that
reverting back to a stock io_apic.c would cause instabilities (which would be
weird, since I had no instabilities running only a patched 8390.c), I think the
patch to 8390.c DOES remove the symptoms all by itself. No other patches seem
necessary to get a stable box.

But I'll patch the mess again just fox kicks :-)

Cheers//Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:35                           ` Frank de Lange
@ 2001-01-12 20:37                             ` Ingo Molnar
  2001-01-12 20:46                               ` David Woodhouse
                                                 ` (2 more replies)
  0 siblings, 3 replies; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:37 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Frank de Lange wrote:

> It is. As I already mentioned in other messages, I already tested with
> JUST the patched 8390.c driver, no other patches. It was stable. I
> then patched apic.c AND io_apic.c, which did not introduce new
> instabilities. Unless you think that reverting back to a stock
> io_apic.c would cause instabilities (which would be weird, since I had
> no instabilities running only a patched 8390.c), I think the patch to
> 8390.c DOES remove the symptoms all by itself. No other patches seem
> necessary to get a stable box.

okay - i just wanted to hear a definitive word from you that this fixes
your problem, because this is what we'll have to do as a final solution.
(barring any other solution.)

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:34 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Ingo Molnar
@ 2001-01-12 20:39   ` Frank de Lange
  0 siblings, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:39 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:34:03PM +0100, Ingo Molnar wrote:
> ? this is x86-only code. There is no hot-pluggable CPU support for Linux
> AFAIK. (But in any case, the code is basically ready for hot-pluggable
> CPUs, just take a few precautions and change cpu_online_mask and a couple
> of other things.)

OK, maybe the Sun example was not the best to give for this code... But if
there are no hot-pluggable x86's around now (I think there are, but can not
recollect who made 'm...) and nobody is complaining, then it is fine with me...
I won't hot-unplug my BP6's CPU's anyway...

Cheers//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:37                             ` Ingo Molnar
@ 2001-01-12 20:46                               ` David Woodhouse
  2001-01-12 20:46                               ` Frank de Lange
  2001-01-12 20:54                               ` Manfred Spraul
  2 siblings, 0 replies; 71+ messages in thread
From: David Woodhouse @ 2001-01-12 20:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Frank de Lange, Manfred Spraul, Linus Torvalds, linux-kernel,
	Alan Cox

On Fri, 12 Jan 2001, Ingo Molnar wrote:

> okay - i just wanted to hear a definitive word from you that this fixes
> your problem, because this is what we'll have to do as a final solution.
> (barring any other solution.)

Patching 8390.c won't fix this for me. The only thing on IRQ19 when I saw
interrupts die was usb-uhci, and that doesn't appear to use disable_irq.

But then again, I've only ever seen this happen once. It's not repeatable.

-- 
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:37                             ` Ingo Molnar
  2001-01-12 20:46                               ` David Woodhouse
@ 2001-01-12 20:46                               ` Frank de Lange
  2001-01-12 20:51                                 ` Ingo Molnar
  2001-01-13  0:15                                 ` Linus Torvalds
  2001-01-12 20:54                               ` Manfred Spraul
  2 siblings, 2 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 20:46 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:37:24PM +0100, Ingo Molnar wrote:
> okay - i just wanted to hear a definitive word from you that this fixes
> your problem, because this is what we'll have to do as a final solution.
> (barring any other solution.)

Now running with this config:

PATCHED 8390.c (using irq_safe spinlocks instead of disable_irq)
PATCHED apic.c (focus cpu ENABLED)
STOCK io_apic.c

No problems under heavy network load.

Gentleman, this (the patch to 8390.c) seems to fix the problem.

Cheers//Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:46                               ` Frank de Lange
@ 2001-01-12 20:51                                 ` Ingo Molnar
  2001-01-12 21:05                                   ` Frank de Lange
  2001-01-13  0:15                                 ` Linus Torvalds
  1 sibling, 1 reply; 71+ messages in thread
From: Ingo Molnar @ 2001-01-12 20:51 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox


On Fri, 12 Jan 2001, Frank de Lange wrote:

> PATCHED 8390.c (using irq_safe spinlocks instead of disable_irq)
> PATCHED apic.c (focus cpu ENABLED)
> STOCK io_apic.c
>
> No problems under heavy network load.
>
> Gentleman, this (the patch to 8390.c) seems to fix the problem.

great. Back when i had the same problem, flood pinging another host (on
the local network) was the quickest way to reproduce the hang:

	ping -f -s 10 otherhost

this produced an IOAPIC-hang within seconds.

	Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:37                             ` Ingo Molnar
  2001-01-12 20:46                               ` David Woodhouse
  2001-01-12 20:46                               ` Frank de Lange
@ 2001-01-12 20:54                               ` Manfred Spraul
  2001-01-12 21:07                                 ` Frank de Lange
  2 siblings, 1 reply; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 20:54 UTC (permalink / raw)
  To: mingo; +Cc: Frank de Lange, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

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

Ingo Molnar wrote:
> 
> 
> okay - i just wanted to hear a definitive word from you that this fixes
> your problem, because this is what we'll have to do as a final solution.
> (barring any other solution.)
> 
Ingo, is that possible?

The current fix is "disable_irq_nosync() and enable_irq() cause
deadlocks with level triggered ioapic irqs, do not use them" - I'm sure
ne2k-pci isn't the only driver that uses these function.

I have found one combination that doesn't hang with the unpatched
8390.c, but network throughput is down to 1/2. I hope that's due to the
debugging changes.

I'll restart now from a fresh 2.4.0 tree:
Changes:

1) enable focus cpu.
2) apply the attached patch.

I'm not sure if it's a real fix or if it just hides the problem: my
sysrq patch has shown that clearing and setting the "level trigger" bit
in the io apic reanimates the IO APIC.

--
        Manfred

[-- Attachment #2: patch-io --]
[-- Type: text/plain, Size: 1698 bytes --]

--- build-2.4/arch/i386/kernel/io_apic.c.orig	Fri Jan 12 20:17:36 2001
+++ build-2.4/arch/i386/kernel/io_apic.c	Fri Jan 12 21:26:31 2001
@@ -134,6 +134,30 @@
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+DO_ACTION( __trigger_level,    0, |= 0x00008000, io_apic_sync(entry->apic))/* mask = 1 */
+DO_ACTION( __trigger_edge,  0, &= 0xffff7fff, )				/* mask = 0 */
+
+
+static void unmask_level_IO_APIC_irq (unsigned int irq)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&ioapic_lock, flags);
+	__trigger_level_IO_APIC_irq(irq);
+	__unmask_IO_APIC_irq(irq);
+	spin_unlock_irqrestore(&ioapic_lock, flags);
+}
+
+static void mask_level_IO_APIC_irq (unsigned int irq)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&ioapic_lock, flags);
+	__mask_IO_APIC_irq(irq);
+	__trigger_edge_IO_APIC_irq(irq);
+	spin_unlock_irqrestore(&ioapic_lock, flags);
+}
+
 static void unmask_IO_APIC_irq (unsigned int irq)
 {
 	unsigned long flags;
@@ -143,6 +167,7 @@
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+
 void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
 {
 	struct IO_APIC_route_entry entry;
@@ -1181,14 +1206,14 @@
  */
 static unsigned int startup_level_ioapic_irq (unsigned int irq)
 {
-	unmask_IO_APIC_irq(irq);
+	unmask_level_IO_APIC_irq(irq);
 
 	return 0; /* don't check for pending */
 }
 
-#define shutdown_level_ioapic_irq	mask_IO_APIC_irq
-#define enable_level_ioapic_irq		unmask_IO_APIC_irq
-#define disable_level_ioapic_irq	mask_IO_APIC_irq
+#define shutdown_level_ioapic_irq	mask_level_IO_APIC_irq
+#define enable_level_ioapic_irq		unmask_level_IO_APIC_irq
+#define disable_level_ioapic_irq	mask_level_IO_APIC_irq
 
 static void end_level_ioapic_irq (unsigned int i)
 {

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:51                                 ` Ingo Molnar
@ 2001-01-12 21:05                                   ` Frank de Lange
  2001-01-15  2:00                                     ` Jorge Nerin
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 21:05 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:51:36PM +0100, Ingo Molnar wrote:
> great. Back when i had the same problem, flood pinging another host (on
> the local network) was the quickest way to reproduce the hang:
> 
> 	ping -f -s 10 otherhost
> 
> this produced an IOAPIC-hang within seconds.

Apart from killing streaming audio and interactive network use, nothing hangs.
As soon as the ping flood is stopped, audio streams on and ssh sessions are
useable again. So, it seems to fix it...

Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:54                               ` Manfred Spraul
@ 2001-01-12 21:07                                 ` Frank de Lange
  2001-01-12 21:31                                   ` Manfred Spraul
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 21:07 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: mingo, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:54:31PM +0100, Manfred Spraul wrote:
> I have found one combination that doesn't hang with the unpatched
> 8390.c, but network throughput is down to 1/2. I hope that's due to the
> debugging changes.

Hm, could it be that the fact that network throughput is halved causes the
problem not to appear? Remember, it only appears under HEAVY network load. A
single nfs cp -rd <big_dir> was not enough to hang my network, I needed to add
at least another cp -rd or some streaming audio or something else...

Cheers//Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 19:59               ` Linus Torvalds
                                   ` (2 preceding siblings ...)
  2001-01-12 20:11                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Manfred Spraul
@ 2001-01-12 21:21                 ` Frank de Lange
  3 siblings, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-12 21:21 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Manfred Spraul, dwmw2, linux-kernel, mingo, Alan Cox

> Remind me: what polarity are your io-apic irq's? Level, edge, sideways?
> Anything else that might be relevant?

Well, sideways ofcourse! :-)

here's a cat /proc/interrupts from the (BP6) box:

           CPU0       CPU1       
  0:     104936     105433    IO-APIC-edge  timer
  1:       4444       4384    IO-APIC-edge  keyboard
  2:          0          0          XT-PIC  cascade
  3:         79         59    IO-APIC-edge  serial
  4:      12743      12850    IO-APIC-edge  serial
 14:       7855       7885    IO-APIC-edge  ide0
 15:       1990       1703    IO-APIC-edge  ide1
 16:          0          0   IO-APIC-level  es1371, mga@PCI:1:0:0
 17:         24         28   IO-APIC-level  sym53c8xx
 18:          0          0   IO-APIC-level  bttv
 19:     460435     460402   IO-APIC-level  eth0, eth1, usb-uhci
NMI:     210303     210303 
LOC:     210285     210284 
ERR:          0

The interrupt which caused problems was 19 (with both network cards and USB on
it). It shows a high number of interrupts because I've been load-testing the
network. The mere fact that it shows this hig number of interrupts shows the
fix works...

As this is a BP6, I'm now supposed to go on about the dead chickens, dedicated
air conditioners, nuclear powersupplies and other magic you're supposed to buy
to get these boards running. Well, nothing of that sort, it is running on a
simple (but high quality) 235W PSU with heatgreased coolers on the CPUs and the
BX xhipset. Nothing is overclocked. CPU and chipset tmeperatures are 24.C and
32.C, respectively.

In short, nothing remarkable. All PCI slots are used, as you can see from my
first posting in this thread (which contains more info on the hardware).

//Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 21:07                                 ` Frank de Lange
@ 2001-01-12 21:31                                   ` Manfred Spraul
  0 siblings, 0 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-12 21:31 UTC (permalink / raw)
  To: Frank de Lange; +Cc: mingo, Linus Torvalds, dwmw2, linux-kernel, Alan Cox

Frank de Lange wrote:
> 
> On Fri, Jan 12, 2001 at 09:54:31PM +0100, Manfred Spraul wrote:
> > I have found one combination that doesn't hang with the unpatched
> > 8390.c, but network throughput is down to 1/2. I hope that's due to the
> > debugging changes.
> 
> Hm, could it be that the fact that network throughput is halved causes the
> problem not to appear?

No. The problem is still there. But now lots of losts packets instead of
a total hang.

Due to the modification of mask_irq now disable_irq_nosync and
enable_irq act as if I would press SysRQ+q every millisecond, and thus
the io apic is immediatly reset when it got stuck.

Btw, my initial assumption about EOI to masked interrupt must be wrong:
2.2 always first masks the irq, then it sends the EOI, and 2.2 doesn't
hang.

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Latest status of IDE patches from Andre
  2001-01-12 17:49 ` Alan Cox
  2001-01-12 18:08   ` Manfred Spraul
@ 2001-01-12 22:03   ` Jeff Nguyen
  1 sibling, 0 replies; 71+ messages in thread
From: Jeff Nguyen @ 2001-01-12 22:03 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Hi Alan,

Will you incorporate Andre IDE patches into the 2.2.19preXX
kernel? If not, do you have any plan to do so in the very near future? 
I know this issue has been discussed before. But there has not been
any progress.

I have been following the kernel development for years. I have seen
many drivers added to the kernel. Some weren't working properly
and had to be removed quickly. Strangely, the IDE patches drag on
and on after all the kernel releases.

Are you still concern about the stability of the driver?  

Regards,

Jeff

ASL Inc.

 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 18:28     ` Linus Torvalds
@ 2001-01-12 23:27       ` Alan Cox
  2001-01-13  0:35         ` Linus Torvalds
  0 siblings, 1 reply; 71+ messages in thread
From: Alan Cox @ 2001-01-12 23:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

> interrupt controllers (io-apic definitely included).  Drivers would
> generally be better off if they disabled their own chip from sending
> interrupts, rather than disabling the interrupt line the chip is on. 

That doesn't work very well because the device irq can arrive a measurable
number of clocks after you disable it on the source and there is no way to
say 'and be sure the stupid thing has propogated the apic bus'

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 19:33           ` Manfred Spraul
  2001-01-12 19:52             ` Frank de Lange
@ 2001-01-12 23:35             ` Alan Cox
  2001-01-13  0:06               ` Manfred Spraul
                                 ` (2 more replies)
  1 sibling, 3 replies; 71+ messages in thread
From: Alan Cox @ 2001-01-12 23:35 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: Frank de Lange, dwmw2, linux-kernel, mingo, Alan Cox, torvalds

> Could you disable both bandaids? I disabled them, no problems so far.
> Now back to the disable_irq_nosync().

Ok so it looks like the disable_irq code is buggy. Unfortunately its not
just used for these drivers they are just the heaviest users.

Given that we can see the IRQ is still set on the APIC can we fake an IRQ in
that condition ?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:31                         ` Ingo Molnar
  2001-01-12 20:35                           ` Frank de Lange
@ 2001-01-12 23:50                           ` Alan Cox
  1 sibling, 0 replies; 71+ messages in thread
From: Alan Cox @ 2001-01-12 23:50 UTC (permalink / raw)
  To: mingo
  Cc: Frank de Lange, Manfred Spraul, Linus Torvalds, dwmw2,
	linux-kernel, Alan Cox

> WITH. patched 8390.c, patched apic.c, sock io_apic.c. My very strong
> feeling is that this will be a stable combination, and that this is what
> we want as a final solution.

If you do that please #ifdef SMP all the changes. Its impossible to use a modem
and an ne2K together on a typical PC otherwise. The copy from the NE2K with
irq disabled is just _SO_ slow you drop bytes continually.

I did all the horrible magic in the ne2k driver for a reason. The other 
alternative is to provide a way to force the system back out of apic mode
so the ne2K driver can do a

	goodbye_apic_crap()

type call

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
@ 2001-01-13  0:06               ` Manfred Spraul
  2001-01-13  0:36               ` Linus Torvalds
  2001-01-13  2:10               ` Andrew Morton
  2 siblings, 0 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-13  0:06 UTC (permalink / raw)
  To: Alan Cox; +Cc: Frank de Lange, dwmw2, linux-kernel, mingo, torvalds

Alan Cox wrote:
> 
> > Could you disable both bandaids? I disabled them, no problems so far.
> > Now back to the disable_irq_nosync().
> 
> Ok so it looks like the disable_irq code is buggy. Unfortunately its not
> just used for these drivers they are just the heaviest users.
> 
> Given that we can see the IRQ is still set on the APIC can we fake an IRQ in
> that condition ?

Switch to edge triggered, wait , switch back to level triggered - I've
added that to my sysrq commands, and it clears the IRR bit in the IO
APIC. Sometimes 2 or 3 attempts are required.

I tried several changes to the ioapic code, but without success.

I found:
* the io_apic_sync() in __mask_IO_APIC_irq() is probably wrong, I'd say
it should be _after_ the io_apic_modify, but currently it is before the
io_apic_modify(). 2.2 uses the same code, that doesn't explain the
problem.

* this comment in
http://oss.sgi.com/www.linux.sgi.com/intel/visws/visws.2210.28jul99.patch

+/* XXX ouch... is this really our only choice for masking this
interrupt? */
+/* XXX not fully safe for 2 reasons:
+ *     1) should not touch an apic entry while (whole) apic is enabled
+ *     2) careful about storing to IRR bit (unless we know this intr is
idle)
+ */
+static void disable_cobalt_irq(unsigned int irq)       /* disable_irq()
*/
+{
+       int ent = is_co_apic(irq);
+       if (ent == -1) {
+               return; /* could actually be a panic */
+       }
+
+       /* Note: h/w nada like read-mod-write!  Vec saved in
IRQ_VECTOR() */
+       co_apic_write(CO_APIC_LO(ent), CO_APIC_MASK);
+       (void)co_apic_read(CO_APIC_LO(ent)); /* sync cpu to cobalt apic
*/
+}
+
It's possible that the comment is about an cobalt specific problem, the
IRR bit is - according the Intel documentation - read only.


--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 20:46                               ` Frank de Lange
  2001-01-12 20:51                                 ` Ingo Molnar
@ 2001-01-13  0:15                                 ` Linus Torvalds
  2001-01-13  0:19                                   ` Frank de Lange
  1 sibling, 1 reply; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  0:15 UTC (permalink / raw)
  To: Frank de Lange; +Cc: Ingo Molnar, Manfred Spraul, dwmw2, linux-kernel, Alan Cox



On Fri, 12 Jan 2001, Frank de Lange wrote:
> 
> Gentleman, this (the patch to 8390.c) seems to fix the problem.

The problem with this patch is that anybody with a slow ISA ne2000 clone
will basically have absolutely _horrible_ interrupt latency because we
hold the irq lock over some quite expensive operations.

The spin_lock_irqsave() is absolutely my preferred fix, and if I remember
correctly this is in fact how some early 2.1.x code fixed the ne2000
driver when the original irq scalability stuff happened (for some time
during development we did not have a working "disable_irq()" AT ALL
because the irq-disabling counters etc logic hadn't been done).

The spinlock was changed to "disable_irq()" by a patch from Alan, if I
remember correctly, exactly because people couldn't access serial lines at
any kind of high speeds otherwise - even on "reasonable" hardware.

Alan may remember details better. The fact is that as a general design
principle we should _not_ be using "disable_irq/enable_irq" anyway. BUT
that there are some real-world concerns that make the "better" spinlock
handling have some problems too.

So yes, I bet the spinlock fixes it. But..

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-13  0:15                                 ` Linus Torvalds
@ 2001-01-13  0:19                                   ` Frank de Lange
  2001-01-13  0:29                                     ` Alan Cox
  0 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-13  0:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Ingo Molnar, Manfred Spraul, dwmw2, linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 04:15:37PM -0800, Linus Torvalds wrote:
> On Fri, 12 Jan 2001, Frank de Lange wrote:
> > 
> > Gentleman, this (the patch to 8390.c) seems to fix the problem.
> 
> The problem with this patch is that anybody with a slow ISA ne2000 clone
> will basically have absolutely _horrible_ interrupt latency because we
> hold the irq lock over some quite expensive operations.
> 
> The spin_lock_irqsave() is absolutely my preferred fix, and if I remember
> correctly this is in fact how some early 2.1.x code fixed the ne2000
> driver when the original irq scalability stuff happened (for some time
> during development we did not have a working "disable_irq()" AT ALL
> because the irq-disabling counters etc logic hadn't been done).

And that's the patch I meant... Manfred's
spin_lock_irqsave/spin_unlock_irqrestore based one, not my
(spin_lock_irq/spin_unlock_irq) based patch. That is also the one I'm running
now.

Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-13  0:19                                   ` Frank de Lange
@ 2001-01-13  0:29                                     ` Alan Cox
  0 siblings, 0 replies; 71+ messages in thread
From: Alan Cox @ 2001-01-13  0:29 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Linus Torvalds, Ingo Molnar, Manfred Spraul, dwmw2, linux-kernel,
	Alan Cox

> > The spin_lock_irqsave() is absolutely my preferred fix, and if I remember
> > correctly this is in fact how some early 2.1.x code fixed the ne2000
> > driver when the original irq scalability stuff happened (for some time
> > during development we did not have a working "disable_irq()" AT ALL
> > because the irq-disabling counters etc logic hadn't been done).
> 
> And that's the patch I meant... Manfred's
> spin_lock_irqsave/spin_unlock_irqrestore based one, not my
> (spin_lock_irq/spin_unlock_irq) based patch. That is also the one I'm running
> now.

The old code did it with #ifdef __SMP__ tests so it only screwed up SMP boxes,
which at the time was quite acceptable because real people didnt have them
and certainly at the price didnt put ne2000's in them 8)

The basic problem is that you cannot allow

	-	set multicast list
	-	open/close
	-	irq
	-	transmit

to occur except when serialized because of the indirection and register
gunge on the chip. The copies are slow and long enough that they prevent
28.8 modem sessions being usable.

I'd have to check the chip manual to be sure you even disable the irqs
without corrupting an in progress transfer

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 23:27       ` Alan Cox
@ 2001-01-13  0:35         ` Linus Torvalds
  2001-01-13  0:43           ` Alan Cox
  0 siblings, 1 reply; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  0:35 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel



On Fri, 12 Jan 2001, Alan Cox wrote:

> > interrupt controllers (io-apic definitely included).  Drivers would
> > generally be better off if they disabled their own chip from sending
> > interrupts, rather than disabling the interrupt line the chip is on. 
> 
> That doesn't work very well because the device irq can arrive a measurable
> number of clocks after you disable it on the source and there is no way to
> say 'and be sure the stupid thing has propogated the apic bus'

I agree. Asynchronous buses are nasty that way. However, if your "locking"
is based on device state, you can still do it: you just have to have an
internal device protocol. The simplest example of this is:

	interrupt_handler()
	{
		status = readl(dev->status);
		if (status & MY_IRQ_DISABLE)
			return;

	}


	{
		status = readl(dev->status);
		writel(dev->status, status | MY_IRQ_DISABLE);
		spin_lock();
		.. critical region ..
		spin_unlock();
		writel(dev->status, status);
	}


Notice how the above does NOT guarantee that the physical interrupt might
not be "in flight". It does, however, synchronize other ways, simply by
virtue of using the _synchronous_ bus (PCI, in this case) to figure out
when the asynchronous bus (interrupts) has a bogus event.

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
  2001-01-13  0:06               ` Manfred Spraul
@ 2001-01-13  0:36               ` Linus Torvalds
  2001-01-13  0:48                 ` Frank de Lange
  2001-01-13  1:38                 ` Manfred Spraul
  2001-01-13  2:10               ` Andrew Morton
  2 siblings, 2 replies; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  0:36 UTC (permalink / raw)
  To: Alan Cox; +Cc: Manfred Spraul, Frank de Lange, dwmw2, linux-kernel, mingo



On Fri, 12 Jan 2001, Alan Cox wrote:

> > Could you disable both bandaids? I disabled them, no problems so far.
> > Now back to the disable_irq_nosync().
> 
> Ok so it looks like the disable_irq code is buggy. Unfortunately its not
> just used for these drivers they are just the heaviest users.

It may well not be disable_irq() that is buggy. In fact, there's good
reason to believe that it's a hardware problem.

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:35         ` Linus Torvalds
@ 2001-01-13  0:43           ` Alan Cox
  2001-01-13  0:48             ` Linus Torvalds
  0 siblings, 1 reply; 71+ messages in thread
From: Alan Cox @ 2001-01-13  0:43 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, linux-kernel

> 	interrupt_handler()
> 	{
> 		status = readl(dev->status);
> 		if (status & MY_IRQ_DISABLE)
> 			return;

Unfortunately on the 8390 the IRQ statud register is on page 0. The code
on the other CPU might not be on page 0. That means we can't even safely
check if there is an irq pending or clear it down (bad news on ne2k-pci)
without getting that lock.

That means we have to be able to just block that one irq source to avoid
horrible SMP latency problems. 

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:36               ` Linus Torvalds
@ 2001-01-13  0:48                 ` Frank de Lange
  2001-01-13  0:56                   ` Linus Torvalds
  2001-01-13  1:38                 ` Manfred Spraul
  1 sibling, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-13  0:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, Manfred Spraul, dwmw2, linux-kernel, mingo

On Fri, Jan 12, 2001 at 04:36:33PM -0800, Linus Torvalds wrote:
> It may well not be disable_irq() that is buggy. In fact, there's good
> reason to believe that it's a hardware problem.

I am inclined to believe it IS a hardware problem... If disable_irq were buggy,
wouldn't the problem occur more frequently in other irq-heavy areas? A quick
count shows that disable_irq* is used in 84 sourcefiles in the driver/*
directory. This includes drivers which generate many interrupts in a short
timeframe (like ide).

Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:43           ` Alan Cox
@ 2001-01-13  0:48             ` Linus Torvalds
  0 siblings, 0 replies; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  0:48 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel



On Sat, 13 Jan 2001, Alan Cox wrote:

> > 	interrupt_handler()
> > 	{
> > 		status = readl(dev->status);
> > 		if (status & MY_IRQ_DISABLE)
> > 			return;
> 
> Unfortunately on the 8390 the IRQ statud register is on page 0. The code
> on the other CPU might not be on page 0. That means we can't even safely
> check if there is an irq pending or clear it down (bad news on ne2k-pci)
> without getting that lock.

Alan.

THINK.

The "synchronous channel" can be _memory_. I just used the above as an
example of using a synchronous channel to make sure that the asynchronous
buses aren't screwing us.

You only need one bit of synchronous information. The example used the
very same bit that the irq flag on the device is anyway - which works on a
lot of devices simply because they need to read the status flags anyway
in order to handle the interrupt.

But if you have problems with that, just use an atomic flag off
"dev->private" instead. Big deal.

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:48                 ` Frank de Lange
@ 2001-01-13  0:56                   ` Linus Torvalds
  2001-01-13  1:27                     ` Frank de Lange
                                       ` (3 more replies)
  0 siblings, 4 replies; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  0:56 UTC (permalink / raw)
  To: Frank de Lange; +Cc: Alan Cox, Manfred Spraul, dwmw2, linux-kernel, mingo



On Sat, 13 Jan 2001, Frank de Lange wrote:

> On Fri, Jan 12, 2001 at 04:36:33PM -0800, Linus Torvalds wrote:
> > It may well not be disable_irq() that is buggy. In fact, there's good
> > reason to believe that it's a hardware problem.
> 
> I am inclined to believe it IS a hardware problem... If disable_irq were buggy,
> wouldn't the problem occur more frequently in other irq-heavy areas? A quick
> count shows that disable_irq* is used in 84 sourcefiles in the driver/*
> directory. This includes drivers which generate many interrupts in a short
> timeframe (like ide).

IDE is not my favourite example of a "known stable driver". Also, in many
cases IDE is for historical reasons connected to an EDGE io-apic pin (ie
it's still considered an ISA interrupt). Which probably wouldn't show this
problem anyway.

Also, IDE doesn't generate all that many interrupts. You can make a
network driver do a _lot_ more interrupts than just about any disk driver
by simply sending/receiving a lot of packets. With disks it is very hard
to get the same kind of irq load - Linux will merge the requests and do at
least 1kB worth of transfer per interrupt etc. On a ne2k 100Mbps PCI card,
you can probably _easily_ generate a much higher stream of interrupts.

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:56                   ` Linus Torvalds
@ 2001-01-13  1:27                     ` Frank de Lange
  2001-01-13  1:51                       ` Manfred Spraul
  2001-01-13  1:49                     ` Jens Axboe
                                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 71+ messages in thread
From: Frank de Lange @ 2001-01-13  1:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, Manfred Spraul, dwmw2, linux-kernel, mingo

On Fri, Jan 12, 2001 at 04:56:24PM -0800, Linus Torvalds wrote:
> IDE is not my favourite example of a "known stable driver". Also, in many
> cases IDE is for historical reasons connected to an EDGE io-apic pin (ie
> it's still considered an ISA interrupt). Which probably wouldn't show this
> problem anyway.

They (ide interrupts) are indeed EDGE-triggered on my box. I have not enabled
the HPT366 (ATA66) controller on this board, so I can not tell if that
controller is EDGE-triggered as well.

> Also, IDE doesn't generate all that many interrupts. You can make a
> network driver do a _lot_ more interrupts than just about any disk driver
> by simply sending/receiving a lot of packets. With disks it is very hard
> to get the same kind of irq load - Linux will merge the requests and do at
> least 1kB worth of transfer per interrupt etc. On a ne2k 100Mbps PCI card,
> you can probably _easily_ generate a much higher stream of interrupts.

There's sound... The msnd.c (Turtle Beach MultiSound) driver (and its
derivatives, like msnd_pinnacle) uses disable_irq.  Running esd (esound
daemon), sound can easily generate > 1000 interrupts/second, since esd uses
small dma transfers. This can be seen quite clearly from /proc/interrupts on my
soundserver:

           CPU0       
  0:  276867328          XT-PIC  timer
  1:          2          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:    7631519          XT-PIC  eth1
  4:    2751419          XT-PIC  serial
  5: 1907346678          XT-PIC  soundblaster
  8:          1          XT-PIC  rtc
  9:   45022986          XT-PIC  eth0
 13:          1          XT-PIC  fpu
 14:    4320643          XT-PIC  ide0
 15:    4409193          XT-PIC  ide1
NMI:          0

OK, this is an ageing P166, and it uses a different driver, etc. I have not
found any problems with hanging sound drivers in Google query for 'linux msnd
bp6' or 'linux multisound bp6'. Of course, this is no conclusive evidence, far
from it... It could be that people using those cards are not the ones who tend
to go for the (somewhat tricky) BP6 board...

Cheers//Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:36               ` Linus Torvalds
  2001-01-13  0:48                 ` Frank de Lange
@ 2001-01-13  1:38                 ` Manfred Spraul
  1 sibling, 0 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-13  1:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, Frank de Lange, dwmw2, linux-kernel, mingo

Linus Torvalds wrote:
> 
> It may well not be disable_irq() that is buggy. In fact, there's good
> reason to believe that it's a hardware problem.
> 
Perhaps a problem with the 82093AA external IO APIC used for 440BX
board? I haven't seen any reports from newer Intel boards (the ICH2
includes an IO APIC) or from Via boards.

The problem is not SMP specific: Frank wrote that it also occured when
he booted with "max_cpus=1".

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:56                   ` Linus Torvalds
  2001-01-13  1:27                     ` Frank de Lange
@ 2001-01-13  1:49                     ` Jens Axboe
  2001-01-13  2:12                     ` Andrew Morton
  2001-01-15 16:15                     ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Zdenek Kabelac
  3 siblings, 0 replies; 71+ messages in thread
From: Jens Axboe @ 2001-01-13  1:49 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Frank de Lange, Alan Cox, Manfred Spraul, dwmw2, linux-kernel,
	mingo

On Fri, Jan 12 2001, Linus Torvalds wrote:
> [...] With disks it is very hard
> to get the same kind of irq load - Linux will merge the requests and do at
> least 1kB worth of transfer per interrupt etc. On a ne2k 100Mbps PCI card,

Actually, without mult count you will do only 512b of I/O per interrupt
on IDE. Regardless of merging etc. Still doesn't reach nic levels, but
it's _bad_ anyway :-)

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  1:27                     ` Frank de Lange
@ 2001-01-13  1:51                       ` Manfred Spraul
  2001-01-13  2:11                         ` Frank de Lange
  0 siblings, 1 reply; 71+ messages in thread
From: Manfred Spraul @ 2001-01-13  1:51 UTC (permalink / raw)
  To: Frank de Lange; +Cc: Linus Torvalds, Alan Cox, dwmw2, linux-kernel, mingo

Frank de Lange wrote:
> 
> It could be that people using those cards are not the ones who tend
> to go for the (somewhat tricky) BP6 board...
> 

I doubt that it's BP6 specific: I have the problem with a Gigabyte BXD
board and I doubt that Ingo used an BP6. Perhaps 82093AA specific (the
IO APIC chip used for SMP 440BX board)

I can't find any spec updates for that chip: either it's the first
perfect chip Intel ever produced, or ...

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
  2001-01-13  0:06               ` Manfred Spraul
  2001-01-13  0:36               ` Linus Torvalds
@ 2001-01-13  2:10               ` Andrew Morton
  2 siblings, 0 replies; 71+ messages in thread
From: Andrew Morton @ 2001-01-13  2:10 UTC (permalink / raw)
  To: Alan Cox
  Cc: Manfred Spraul, Frank de Lange, dwmw2, linux-kernel, mingo,
	torvalds, Donald Becker

Alan Cox wrote:
> 
> > Could you disable both bandaids? I disabled them, no problems so far.
> > Now back to the disable_irq_nosync().
> 
> Ok so it looks like the disable_irq code is buggy. Unfortunately its not
> just used for these drivers they are just the heaviest users.
> 
> Given that we can see the IRQ is still set on the APIC can we fake an IRQ in
> that condition ?

As you think about this problem, please bear in mind that
this loss of APIC interrupts also occurs in 2.2 kernels.

Donald may have more details.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  1:51                       ` Manfred Spraul
@ 2001-01-13  2:11                         ` Frank de Lange
  0 siblings, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-13  2:11 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Linus Torvalds, Alan Cox, dwmw2, linux-kernel, mingo

On Sat, Jan 13, 2001 at 02:51:54AM +0100, Manfred Spraul wrote:
> Frank de Lange wrote:
> > 
> > It could be that people using those cards are not the ones who tend
> > to go for the (somewhat tricky) BP6 board...
> > 
> 
> I doubt that it's BP6 specific: I have the problem with a Gigabyte BXD
> board and I doubt that Ingo used an BP6. Perhaps 82093AA specific (the
> IO APIC chip used for SMP 440BX board)

It isn't. But I just meant to indicate that the mere fact that I could not find
any problem-report for that combination does not indicate that there ARE no
problems...

> I can't find any spec updates for that chip: either it's the first
> perfect chip Intel ever produced, or ...

:-)

Well, the BX chipset is one of their better attempts I think...

Frank
-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:56                   ` Linus Torvalds
  2001-01-13  1:27                     ` Frank de Lange
  2001-01-13  1:49                     ` Jens Axboe
@ 2001-01-13  2:12                     ` Andrew Morton
  2001-01-13  2:48                       ` Linus Torvalds
  2001-01-15 16:15                     ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Zdenek Kabelac
  3 siblings, 1 reply; 71+ messages in thread
From: Andrew Morton @ 2001-01-13  2:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Frank de Lange, Alan Cox, Manfred Spraul, dwmw2, linux-kernel,
	mingo

Linus Torvalds wrote:
> 
> On Sat, 13 Jan 2001, Frank de Lange wrote:
> 
> > On Fri, Jan 12, 2001 at 04:36:33PM -0800, Linus Torvalds wrote:
> > > It may well not be disable_irq() that is buggy. In fact, there's good
> > > reason to believe that it's a hardware problem.
> >
> > I am inclined to believe it IS a hardware problem... If disable_irq were buggy,
> > wouldn't the problem occur more frequently in other irq-heavy areas? A quick
> > count shows that disable_irq* is used in 84 sourcefiles in the driver/*
> > directory. This includes drivers which generate many interrupts in a short
> > timeframe (like ide).
> 
> IDE is not my favourite example of a "known stable driver". Also, in many
> cases IDE is for historical reasons connected to an EDGE io-apic pin (ie
> it's still considered an ISA interrupt). Which probably wouldn't show this
> problem anyway.
> 

3c59x calls disable_irq() once per minute, and seems to be
one of the most-affected drivers.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  2:12                     ` Andrew Morton
@ 2001-01-13  2:48                       ` Linus Torvalds
  2001-01-13  3:24                         ` Andrew Morton
  0 siblings, 1 reply; 71+ messages in thread
From: Linus Torvalds @ 2001-01-13  2:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Frank de Lange, Alan Cox, Manfred Spraul, dwmw2, linux-kernel,
	mingo



On Sat, 13 Jan 2001, Andrew Morton wrote:
> 
> 3c59x calls disable_irq() once per minute, and seems to be
> one of the most-affected drivers.

The ne2k thing seems to be the _most_ affected one, as far as I can tell.

However, it could easily be a matter of timing - for example, if the
driver does something to trigger an interrupt _just_ before (or after,
considering the asynchronous nature of writing to the IO-APIC) doing the
enable_irq(), then..

I'm also nervous about the complete lack of locking in vortex_timer():
disabling interrupts doesn't mean that transmits couldn't be
pending. But maybe the hardware is ok with changing status concurrently.

		Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  2:48                       ` Linus Torvalds
@ 2001-01-13  3:24                         ` Andrew Morton
  2001-01-13 12:37                           ` Russell King
  0 siblings, 1 reply; 71+ messages in thread
From: Andrew Morton @ 2001-01-13  3:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Frank de Lange, Alan Cox, Manfred Spraul, dwmw2, linux-kernel,
	mingo

Linus Torvalds wrote:
> 
> I'm also nervous about the complete lack of locking in vortex_timer():
> disabling interrupts doesn't mean that transmits couldn't be
> pending. But maybe the hardware is ok with changing status concurrently.
> 

mm..  It's a little racy wrt vortex_ioctl(), but otherwise OK.
del_timer_sync() in vortex_ioctl() seems to be needed.

disable_irq() is very useful in functions such as this.  It
would be a shame to have to stop using it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  3:24                         ` Andrew Morton
@ 2001-01-13 12:37                           ` Russell King
  2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
  0 siblings, 1 reply; 71+ messages in thread
From: Russell King @ 2001-01-13 12:37 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, Frank de Lange, Alan Cox, Manfred Spraul, dwmw2,
	linux-kernel, mingo

Andrew Morton writes:
> Linus Torvalds wrote:
> > I'm also nervous about the complete lack of locking in vortex_timer():
> > disabling interrupts doesn't mean that transmits couldn't be
> > pending. But maybe the hardware is ok with changing status concurrently.
> 
> disable_irq() is very useful in functions such as this.  It
> would be a shame to have to stop using it.

Doesn't the NCR53C9x SCSI drivers use disable_irq() a lot?  Do they have
any problems?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs  with BP6...)
  2001-01-13 12:37                           ` Russell King
@ 2001-01-13 15:18                             ` Manfred Spraul
  2001-01-13 23:55                               ` Manfred Spraul
                                                 ` (3 more replies)
  0 siblings, 4 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-13 15:18 UTC (permalink / raw)
  To: Russell King
  Cc: Andrew Morton, Linus Torvalds, Frank de Lange, Alan Cox, dwmw2,
	linux-kernel, mingo

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

Russell King wrote:
> 
> Doesn't the NCR53C9x SCSI drivers use disable_irq() a lot?  Do they have
> any problems?
>

It seems that a certain timing is necessary: one flood ping or a single
ncp usually doesn't trigger any problems, but 2 concurrent flood pings
hang the network after 5-10 seconds. It's not multi processor specific,
both I and Frank can trigger it when we boot with one cpu.

So far it seems that only the io apic for the BX chipset is affected
(only SMP BX boards contain an io apic).

Any volunteers with ne2k-pci cards and other motherboards that include
an io apic (e.g. all Intel motherboards that use an IO Controller Hub,
Via Apollo Pro133, Pro133A, KX133)?

Please:
* apply the attached patch.
* compile the kernel for SMP, or at least enable uniprocessor io apic
support.
* reboot.
* flood ping the computer with 2 concurrent flood pings from a second
computer.
* wait one minute.

According to the ICH2 documentation the IRR bit on the IO APIC is
writable - that's either a docu error, or could cause further problems.

--
	Manfred

[-- Attachment #2: patch-focus --]
[-- Type: text/plain, Size: 316 bytes --]

--- linux/arch/i386/kernel/apic.c	Tue Dec  5 21:43:48 2000
+++ linux/arch/i386/kernel/apic.c.new	Sat Jan 13 15:54:56 2001
@@ -270,7 +270,7 @@
 	 *   PCI Ne2000 networking cards and PII/PIII processors, dual
 	 *   BX chipset. ]
 	 */
-#if 0
+#if 1
 	/* Enable focus processor (bit==0) */
 	value &= ~(1<<9);
 #else


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

* Re: Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network  hangs with BP6...)
  2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
@ 2001-01-13 23:55                               ` Manfred Spraul
  2001-01-14  0:18                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
                                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 71+ messages in thread
From: Manfred Spraul @ 2001-01-13 23:55 UTC (permalink / raw)
  To: linux-kernel

It seems that noone uses a Ne2000 compatible pci NIC with a newer
motherboard (every K7 board, Intel 8xx boards, via apollo pro 133), but
I've set up a tiny web site that describes my problem:

	colorfullife.com/~manfred/io_apic

--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-12 20:03                 ` Ingo Molnar
@ 2001-01-14  0:13                   ` Roeland Th. Jansen
  2001-01-14  0:23                     ` Frank de Lange
  0 siblings, 1 reply; 71+ messages in thread
From: Roeland Th. Jansen @ 2001-01-14  0:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Frank de Lange, Manfred Spraul, dwmw2,
	linux-kernel, Alan Cox

On Fri, Jan 12, 2001 at 09:03:49PM +0100, Ingo Molnar wrote:
> well, some time ago i had an ne2k card in an SMP system as well, and found
> this very problem. Disabling/enabling focus-cpu appeared to make a
> difference, but later on i made experiments that show that in both cases
> the hang happens. I spent a good deal of time trying to fix this problem,
> but failed - so any fresh ideas are more than welcome.

for the record. my BP6, non OC, apic smp system with ne2k fails within
24 hours here too. if I can be of any help..... (2.4.0. kernel. no
vmware or opensound)

-- 
Grobbebol's Home                   |  Don't give in to spammers.   -o)
http://www.xs4all.nl/~bengel       | Use your real e-mail address   /\
Linux 2.2.16 SMP 2x466MHz / 256 MB |        on Usenet.             _\_v  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Call for testers: ne2k-pci and io apic
  2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
  2001-01-13 23:55                               ` Manfred Spraul
@ 2001-01-14  0:18                               ` J . A . Magallon
  2001-01-14  0:23                               ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) J . A . Magallon
  2001-01-14  2:14                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
  3 siblings, 0 replies; 71+ messages in thread
From: J . A . Magallon @ 2001-01-14  0:18 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: linux-kernel


On 2001.01.13 Manfred Spraul wrote:
> 
> Any volunteers with ne2k-pci cards and other motherboards that include
> an io apic (e.g. all Intel motherboards that use an IO Controller Hub,
> Via Apollo Pro133, Pro133A, KX133)?
> 
> Please:
> * apply the attached patch.
> * compile the kernel for SMP, or at least enable uniprocessor io apic
> support.
> * reboot..
> * flood ping the computer with 2 concurrent flood pings from a second
> computer.
> * wait one minute.
> 

Volunteer. Mine is a Realtek 8029:
00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS)
        Subsystem: Realtek Semiconductor Co., Ltd. RT8029(AS)
        Flags: medium devsel, IRQ 11
        I/O ports at ef40 [size=32]

Board: SuperMicro P6DGU (440GX,PIIX4), 256Mb, 2xPII@400(Deschutes,512Kb).
The only problem is that I just have a cable connection. Is it enough
a 'loopback' connection (ie, ping myself) ? Does it goes at least until
the card and generates interrupts or stops at the kernel soft level ?
Anyways, if a 128K connection can generate enough flood for you, i'll send
you my results. I am going to test it anyways...

dmesg selected info:
I/O APIC #2 Version 17 at 0xFEC00000.
Int: type 3, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 00
Int: type 0, pol 0, trig 0, bus 2, IRQ 01, APIC ID 2, APIC INT 01
Int: type 0, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 02
Int: type 0, pol 0, trig 0, bus 2, IRQ 03, APIC ID 2, APIC INT 03
Int: type 0, pol 0, trig 0, bus 2, IRQ 04, APIC ID 2, APIC INT 04
Int: type 0, pol 0, trig 0, bus 2, IRQ 06, APIC ID 2, APIC INT 06
Int: type 0, pol 0, trig 0, bus 2, IRQ 07, APIC ID 2, APIC INT 07
Int: type 0, pol 1, trig 1, bus 2, IRQ 08, APIC ID 2, APIC INT 08
Int: type 0, pol 0, trig 0, bus 2, IRQ 09, APIC ID 2, APIC INT 09
Int: type 0, pol 0, trig 0, bus 2, IRQ 0c, APIC ID 2, APIC INT 0c
Int: type 0, pol 0, trig 0, bus 2, IRQ 0d, APIC ID 2, APIC INT 0d
Int: type 0, pol 0, trig 0, bus 2, IRQ 0e, APIC ID 2, APIC INT 0e
Int: type 0, pol 0, trig 0, bus 2, IRQ 0f, APIC ID 2, APIC INT 0f
Int: type 0, pol 3, trig 3, bus 2, IRQ 0a, APIC ID 2, APIC INT 10
Int: type 0, pol 3, trig 3, bus 2, IRQ 0b, APIC ID 2, APIC INT 11
Int: type 0, pol 3, trig 3, bus 2, IRQ 0b, APIC ID 2, APIC INT 12
Int: type 0, pol 3, trig 3, bus 2, IRQ 05, APIC ID 2, APIC INT 13
Int: type 2, pol 0, trig 0, bus 2, IRQ 00, APIC ID 2, APIC INT 17
Lint: type 3, pol 0, trig 0, bus 0, IRQ 00, APIC ID ff, APIC LINT 00
Lint: type 1, pol 0, trig 0, bus 0, IRQ 00, APIC ID ff, APIC LINT 01
Processors: 2
mapped APIC to ffffe000 (fee00000)
mapped IOAPIC to ffffd000 (fec00000)
..
ENABLING IO-APIC IRQs
..changing IO-APIC physical APIC ID to 2 ... ok.
Synchronizing Arb IDs.
init IO_APIC IRQs
 IO-APIC (apicid-pin) 2-0, 2-5, 2-10, 2-11, 2-20, 2-21, 2-22, 2-23 not connected
.
.TIMER: vector=49 pin1=2 pin2=0
activating NMI Watchdog ... done.
testing NMI watchdog ... OK.
number of MP IRQ sources: 18.
number of IO-APIC #2 registers: 24.
testing the IO APIC.......................

IO APIC #2......
... register #00: 02000000
......    : physical APIC id: 02
... register #01: 00170011
......     : max redirection entries: 0017
......     : IO APIC version: 0011
... register #02: 00000000
......     : arbitration: 00
... IRQ redirection table:
 NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   
 00 000 00  1    0    0   0   0    0    0    00
 01 003 03  0    0    0   0   0    1    1    39
 02 003 03  0    0    0   0   0    1    1    31
 03 003 03  0    0    0   0   0    1    1    41
 04 003 03  0    0    0   0   0    1    1    49
 05 000 00  1    0    0   0   0    0    0    00
 06 003 03  0    0    0   0   0    1    1    51
 07 003 03  0    0    0   0   0    1    1    59
 08 003 03  0    0    0   0   0    1    1    61
 09 003 03  0    0    0   0   0    1    1    69
 0a 000 00  1    0    0   0   0    0    0    00
 0b 000 00  1    0    0   0   0    0    0    00
 0c 003 03  0    0    0   0   0    1    1    71
 0d 000 00  1    0    0   0   0    0    0    00
 0e 003 03  0    0    0   0   0    1    1    79
 0f 003 03  0    0    0   0   0    1    1    81
 10 003 03  1    1    0   1   0    1    1    89
 11 003 03  1    1    0   1   0    1    1    91
 12 003 03  1    1    0   1   0    1    1    91
 13 003 03  1    1    0   1   0    1    1    99
 14 000 00  1    0    0   0   0    0    0    00
 15 000 00  1    0    0   0   0    0    0    00
 16 000 00  1    0    0   0   0    0    0    00
 17 000 00  1    0    0   0   0    0    0    00
IRQ to pin mappings:
IRQ0 -> 2
IRQ1 -> 1
IRQ3 -> 3
IRQ4 -> 4
IRQ5 -> 19
IRQ6 -> 6
IRQ7 -> 7
IRQ8 -> 8
IRQ9 -> 9
IRQ10 -> 16
IRQ11 -> 17-> 18
IRQ12 -> 12
IRQ13 -> 13
IRQ14 -> 14
IRQ15 -> 15
................................... done.
calibrating APIC timer ...
.... CPU clock speed is 400.9147 MHz.
.... host bus clock speed is 100.2284 MHz.
cpu: 0, clocks: 1002284, slice: 334094
CPU0<T0:1002272,T1:668176,D:2,S:334094,C:1002284>
cpu: 1, clocks: 1002284, slice: 334094
CPU1<T0:1002272,T1:334080,D:4,S:334094,C:1002284>
checking TSC synchronization across CPUs: passed.
Setting commenced=1, go go go
..
Board Vendor: Supermicro Inc..
Board Name: Intel 440BX/440GX.

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.0-ac8 #1 SMP Fri Jan 12 18:02:50 CET 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related?
  2001-01-14  0:13                   ` Roeland Th. Jansen
@ 2001-01-14  0:23                     ` Frank de Lange
  0 siblings, 0 replies; 71+ messages in thread
From: Frank de Lange @ 2001-01-14  0:23 UTC (permalink / raw)
  To: Roeland Th. Jansen
  Cc: Ingo Molnar, Linus Torvalds, Manfred Spraul, dwmw2, linux-kernel,
	Alan Cox

On Sun, Jan 14, 2001 at 12:13:58AM +0000, Roeland Th. Jansen wrote:
> On Fri, Jan 12, 2001 at 09:03:49PM +0100, Ingo Molnar wrote:
> > well, some time ago i had an ne2k card in an SMP system as well, and found
> > this very problem. Disabling/enabling focus-cpu appeared to make a
> > difference, but later on i made experiments that show that in both cases
> > the hang happens. I spent a good deal of time trying to fix this problem,
> > but failed - so any fresh ideas are more than welcome.
> 
> for the record. my BP6, non OC, apic smp system with ne2k fails within
> 24 hours here too. if I can be of any help..... (2.4.0. kernel. no
> vmware or opensound)

You can help yourself by applying Manfred's patch to 8390.c (in preference to
my own patch to the same file). This will sove the hanging-network problem. If
your entire box hangs, that's another story which will probably not be fixed by
that patch. You can find the patch in Manfred's posting to the list from Fri
Jan 12 2001 - 14:04:24 EST.

I've been running a patched driver for more than a day now, under heavy network
load, without problems.

Frank

-- 
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    frank@unternet.org    /
            -------------------------
 [ "Omnis enim res, quae dando non deficit, dum habetur
    et non datur, nondum habetur, quomodo habenda est."  ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...)
  2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
  2001-01-13 23:55                               ` Manfred Spraul
  2001-01-14  0:18                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
@ 2001-01-14  0:23                               ` J . A . Magallon
  2001-01-14  2:14                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
  3 siblings, 0 replies; 71+ messages in thread
From: J . A . Magallon @ 2001-01-14  0:23 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: linux-kernel


On 2001.01.13 Manfred Spraul wrote:
> 
> Please:
> * apply the attached patch.
> --
> 	Manfred
> --- linux/arch/i386/kernel/apic.c	Tue Dec  5 21:43:48 2000
> +++ linux/arch/i386/kernel/apic.c.new	Sat Jan 13 15:54:56 2001
> @@ -270,7 +270,7 @@
>  	 *   PCI Ne2000 networking cards and PII/PIII processors, dual
>  	 *   BX chipset. ]
>  	 */
> -#if 0
> +#if 1
>  	/* Enable focus processor (bit==0) */
>  	value &= ~(1<<9);
>  #else
> 

In my 2.4.0-ac9, that code goes to line 315 and looks like:

     *   BX chipset. ]
     */
#if 0
    /* Enable focus processor (bit==0) */
    value &= ~APIC_SPIV_FOCUS_DISABLED;
#else
    /* Disable focus processor (bit==1) */
    value |= APIC_SPIV_FOCUS_DISABLED;
#endif
    /*
     * Set spurious IRQ vector

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.0-ac8 #1 SMP Fri Jan 12 18:02:50 CET 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Call for testers: ne2k-pci and io apic
  2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
                                                 ` (2 preceding siblings ...)
  2001-01-14  0:23                               ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) J . A . Magallon
@ 2001-01-14  2:14                               ` J . A . Magallon
  3 siblings, 0 replies; 71+ messages in thread
From: J . A . Magallon @ 2001-01-14  2:14 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: linux-kernel


On 2001.01.13 Manfred Spraul wrote:
> 
> Any volunteers with ne2k-pci cards and other motherboards that include
> an io apic (e.g. all Intel motherboards that use an IO Controller Hub,
> Via Apollo Pro133, Pro133A, KX133)?
> 

In my case, (440GX/BX, PIIX4), network goes off (both with a ping-flood
or some web browsing) with a message:

Jan 14 03:01:25 werewolf kernel: NETDEV WATCHDOG: eth0: transmit timed out
Jan 14 03:01:57 werewolf last message repeated 19 times


-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.0-ac9 #2 SMP Sun Jan 14 01:46:07 CET 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
  2001-01-12 21:05                                   ` Frank de Lange
@ 2001-01-15  2:00                                     ` Jorge Nerin
  0 siblings, 0 replies; 71+ messages in thread
From: Jorge Nerin @ 2001-01-15  2:00 UTC (permalink / raw)
  To: Frank de Lange
  Cc: Ingo Molnar, Manfred Spraul, Linus Torvalds, dwmw2, linux-kernel,
	Alan Cox

Frank de Lange wrote:
> 
> On Fri, Jan 12, 2001 at 09:51:36PM +0100, Ingo Molnar wrote:
> > great. Back when i had the same problem, flood pinging another host (on
> > the local network) was the quickest way to reproduce the hang:
> >
> >       ping -f -s 10 otherhost
> >
> > this produced an IOAPIC-hang within seconds.
> 
> Apart from killing streaming audio and interactive network use, nothing hangs.
> As soon as the ping flood is stopped, audio streams on and ssh sessions are
> useable again. So, it seems to fix it...
> 
> Frank

I do have a 3c503 and a ne2k-pci both of them use the 8390, I can hang
the ne2k-pci easily by doing a ping -f, bigger packet size => early the
hang. But I cannot hang the 3c503 by doing this.

Now with 2.4.0 the ne2k-pci behaviour is that: doing a ping -f works for
some amount of time, then stops for a BIG amount of time (various
minutes), and then it works again (it seems), but at a much slower
speed, and if you test it with normal ping (ping host) you don't get
replies.

The packets really go down to the wire and I even got replies. but I
don't receive it.

Previous versions of 2.4.0-testX caused ne2k-pci to hang and remain
hanged until reboot.

System: Mb Gigabyte 586dx, 2x200MMX, 96Mb RAM,

-- 
Jorge Nerin
<comandante@zaralinux.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-12 20:04       ` Linus Torvalds
@ 2001-01-15 14:36         ` Roeland Th. Jansen
  0 siblings, 0 replies; 71+ messages in thread
From: Roeland Th. Jansen @ 2001-01-15 14:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

On Fri, Jan 12, 2001 at 12:04:21PM -0800, Linus Torvalds wrote:
> Ok, so it's tentatively the IOAPIC disable/enable code.  But it could
> obviously be something that just interacts with it, including just a
> timing issue (ie the _real_ bug might just be bad behaviour when
> changing IO-APIC state at the same time as an interrupt happens, and
> disable/enable-irq just happen to be the only things that do it at a
> high enough frequency that you can see the problem). 


my BP6 with the patch frank sent me and the apic code at line 273 (or
so) defined as '1' and a flood ping :

Jan 14 19:56:19 grobbebol kernel: APIC error on CPU1: 02(02)
Jan 14 19:56:25 grobbebol kernel: APIC error on CPU1: 02(02)
Jan 14 19:58:10 grobbebol last message repeated 2 times
Jan 14 20:00:01 grobbebol kernel: APIC error on CPU1: 02(02)
Jan 14 20:01:11 grobbebol last message repeated 2 times
Jan 14 20:01:48 grobbebol kernel: APIC error on CPU1: 02(02)
Jan 14 20:01:59 grobbebol kernel: APIC error on CPU1: 02(08)
Jan 14 20:02:10 grobbebol kernel: APIC error on CPU1: 08(08)
Jan 14 20:02:39 grobbebol kernel: APIC error on CPU1: 08(02)
Jan 14 20:02:39 grobbebol kernel: unexpected IRQ trap at vector 8d
Jan 14 20:15:32 grobbebol kernel: APIC error on CPU1: 02(08)
[....]


ad the network is dead. however, no crashes seen during this.
-- 
Grobbebol's Home                   |  Don't give in to spammers.   -o)
http://www.xs4all.nl/~bengel       | Use your real e-mail address   /\
Linux 2.2.16 SMP 2x466MHz / 256 MB |        on Usenet.             _\_v  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware
  2001-01-13  0:56                   ` Linus Torvalds
                                       ` (2 preceding siblings ...)
  2001-01-13  2:12                     ` Andrew Morton
@ 2001-01-15 16:15                     ` Zdenek Kabelac
  3 siblings, 0 replies; 71+ messages in thread
From: Zdenek Kabelac @ 2001-01-15 16:15 UTC (permalink / raw)
  To: Linus Torvalds

Linus Torvalds wrote:
> 
> On Sat, 13 Jan 2001, Frank de Lange wrote:
> 
> IDE is not my favourite example of a "known stable driver". Also, in many
> cases IDE is for historical reasons connected to an EDGE io-apic pin (ie
> it's still considered an ISA interrupt). Which probably wouldn't show this
> problem anyway.

I've been having similar problem with my network card 3c59x. My BP6 was
hanging with 
50% probablity while running netscape from nfs mounted /usr partition).

For 2.2 kernel I've created this patch which has solved this problem
(so I don't have any problems until recentely I've started to use UDMA4
with ATA66
- but this seems to be related to BX chipset problem and as far as I
know Andre
is working on this issue)

While using this patch - I've got many messages about irq_enter in my
kernel log,
but the system was stable and running quite happy.

With the latest 2.4 kernels I do not have same problems (at least it
looks so far)
(So I assume the problem was hidden somewhere inside NFS).
However with 2.4.0 & ac patches I'm seeing some problem when one CPU is
locked
and the computer becomes unusable without any reason - there is no
network trafick
no ide intensive actions - all I can do is to move mouse within Xfree
(so maybe
its xfree bug - but its hard to recognize this - all I could say is that
I'm not seeing
such problems with -test12 kernels)


Here the patch for 2.2 I've been using:


--- linux.orig/arch/i386/kernel/irq.h   Wed May 31 11:21:04
2000                
+++ linux/arch/i386/kernel/irq.h        Wed May 31 11:21:47
2000                
@@ -138,8 +138,22
@@                                                            
 static inline void irq_enter(int cpu, unsigned int
irq)                        

{                                                                              
       
hardirq_enter(cpu);                                                     
-       while (test_bit(0,&global_irq_lock))
{                                  
-               /* nothing
*/;                                                  
+       if (global_irq_holder == cpu && test_bit(0, &global_irq_lock))
{        
+                printk(KERN_WARNING "irq_enter - CPU:%d already holder
(count:%
+                       cpu, global_irq_count,
local_irq_count[cpu]);           
+                /* avoid deadlock bellow
*/                                    
+               
clear_bit(0,&global_irq_lock);                                 
+        } else
{                                                               
+            unsigned long i =
1000000;                                         
+            while (test_bit(0,&global_irq_lock) && i)
{                        
+               
i--;                                                           
+                /* nothing
*/;                                                 
+           
}                                                                  
+            if (!i)
{                                                          
+               
clear_bit(0,&global_irq_lock);                                 
+                printk(KERN_WARNING "irq_enter - loop timeout CPU:%d 
Holder:%d!
+                       cpu,
global_irq_holder);                                
+           
}                                                                  
       
}                                                                       

}                                                                              
               printk(KERN_WARNING "irq_enter - loop timeout CPU:%d 
Holder:%d!

-- 
             There are three types of people in the world:
               those who can count, and those who can't.
  Zdenek Kabelac  http://i.am/kabi/ kabi@i.am {debian.org; fi.muni.cz}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-01-15 16:15 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-12 17:16 QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Manfred Spraul
2001-01-12 17:33 ` Frank de Lange
2001-01-12 17:51   ` Manfred Spraul
2001-01-12 18:25     ` Frank de Lange
2001-01-12 19:04       ` Manfred Spraul
2001-01-12 19:07         ` Frank de Lange
2001-01-12 19:21         ` Frank de Lange
2001-01-12 19:33           ` Manfred Spraul
2001-01-12 19:52             ` Frank de Lange
2001-01-12 19:59               ` Linus Torvalds
2001-01-12 20:03                 ` Ingo Molnar
2001-01-14  0:13                   ` Roeland Th. Jansen
2001-01-14  0:23                     ` Frank de Lange
2001-01-12 20:05                 ` Frank de Lange
2001-01-12 20:11                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Manfred Spraul
2001-01-12 20:16                   ` Frank de Lange
2001-01-12 20:19                     ` Ingo Molnar
2001-01-12 20:26                       ` Frank de Lange
2001-01-12 20:31                         ` Ingo Molnar
2001-01-12 20:35                           ` Frank de Lange
2001-01-12 20:37                             ` Ingo Molnar
2001-01-12 20:46                               ` David Woodhouse
2001-01-12 20:46                               ` Frank de Lange
2001-01-12 20:51                                 ` Ingo Molnar
2001-01-12 21:05                                   ` Frank de Lange
2001-01-15  2:00                                     ` Jorge Nerin
2001-01-13  0:15                                 ` Linus Torvalds
2001-01-13  0:19                                   ` Frank de Lange
2001-01-13  0:29                                     ` Alan Cox
2001-01-12 20:54                               ` Manfred Spraul
2001-01-12 21:07                                 ` Frank de Lange
2001-01-12 21:31                                   ` Manfred Spraul
2001-01-12 23:50                           ` Alan Cox
2001-01-12 21:21                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Frank de Lange
2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
2001-01-13  0:06               ` Manfred Spraul
2001-01-13  0:36               ` Linus Torvalds
2001-01-13  0:48                 ` Frank de Lange
2001-01-13  0:56                   ` Linus Torvalds
2001-01-13  1:27                     ` Frank de Lange
2001-01-13  1:51                       ` Manfred Spraul
2001-01-13  2:11                         ` Frank de Lange
2001-01-13  1:49                     ` Jens Axboe
2001-01-13  2:12                     ` Andrew Morton
2001-01-13  2:48                       ` Linus Torvalds
2001-01-13  3:24                         ` Andrew Morton
2001-01-13 12:37                           ` Russell King
2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
2001-01-13 23:55                               ` Manfred Spraul
2001-01-14  0:18                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
2001-01-14  0:23                               ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) J . A . Magallon
2001-01-14  2:14                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
2001-01-15 16:15                     ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Zdenek Kabelac
2001-01-13  1:38                 ` Manfred Spraul
2001-01-13  2:10               ` Andrew Morton
2001-01-12 17:49 ` Alan Cox
2001-01-12 18:08   ` Manfred Spraul
2001-01-12 18:16     ` Ingo Molnar
2001-01-12 18:45       ` Manfred Spraul
2001-01-12 18:48         ` Ingo Molnar
2001-01-12 18:28     ` Linus Torvalds
2001-01-12 23:27       ` Alan Cox
2001-01-13  0:35         ` Linus Torvalds
2001-01-13  0:43           ` Alan Cox
2001-01-13  0:48             ` Linus Torvalds
2001-01-12 19:05     ` Frank de Lange
2001-01-12 20:04       ` Linus Torvalds
2001-01-15 14:36         ` Roeland Th. Jansen
2001-01-12 22:03   ` Latest status of IDE patches from Andre Jeff Nguyen
     [not found] <20010112213217.E26555@unternet.org>
2001-01-12 20:34 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Ingo Molnar
2001-01-12 20:39   ` Frank de Lange

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