[patch] genirq: temporary fix for level-triggered IRQ resend



Hi,

I see there is a bit of complaining on this original resend temporary
patch. But, since it seems to do a good job for some people, here is
my proposal to limit the 'range of fire' a little bit.

Marcin and Jean-Baptiste: try to test this with 2.6.23-rc2, please.
(Unless Ingo or Thomas have other plans with this problem?)

Thanks,
Jarek P.

-------->

Subject: [patch] genirq: temporary fix for level-triggered IRQ resend


Marcin Slusarz reported a ne2k-pci "hung network interface" regression.

delayed disable relies on the ability to re-trigger the interrupt in the
case that a real interrupt happens after the software disable was set.
In this case we actually disable the interrupt on the hardware level
_after_ it occurred.

On enable_irq, we need to re-trigger the interrupt. On i386 this relies
on a hardware resend mechanism (send_IPI_self()).

Actually we only need the resend for edge type interrupts. Level type
interrupts come back once enable_irq() re-enables the interrupt line.

Marcin found that when he disables the irq line on the hardware level
(removing the delayed disable) the card is kept alive.

Thomas Gleixner prepared a testing patch which proved to fix hung ups
after limiting irqs resending to edge type only. Then Ingo Molnar's
version of this patch was applied to 2.6.23-rc2 kernel as a temporary
solution. Since, the problem is still diagnosed, but seems to affect
mainly X86_64 arch, here is a modified, but still temporary, version of
this solution, which should limit the range of warnings and changes in
interrupt handling to minimum.


Signed-off-by: Jarek Poplawski <jarkao2@xxxxx>
Cc: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
Cc: Jean-Baptiste Vignaud <vignaud@xxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>

---

diff -Nurp 2.6.23-rc2-/kernel/irq/resend.c 2.6.23-rc2/kernel/irq/resend.c
--- 2.6.23-rc2-/kernel/irq/resend.c 2007-08-08 11:48:15.000000000 +0200
+++ 2.6.23-rc2/kernel/irq/resend.c 2007-08-08 11:58:42.000000000 +0200
@@ -62,18 +62,19 @@ void check_irq_resend(struct irq_desc *d
*/
desc->chip->enable(irq);

+ if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
+ desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
+
+#ifdef CONFIG_X86_64
/*
* Temporary hack to figure out more about the problem, which
* is causing the ancient network cards to die.
*/
- if (desc->handle_irq != handle_edge_irq) {
- WARN_ON_ONCE(1);
- return;
- }
-
- if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
- desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
-
+ if (desc->handle_irq == handle_fasteoi_irq) {
+ WARN_ON_ONCE(1);
+ return;
+ }
+#endif
if (!desc->chip || !desc->chip->retrigger ||
!desc->chip->retrigger(irq)) {
#ifdef CONFIG_HARDIRQS_SW_RESEND
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: 2.6.20->2.6.21 - networking dies after random time
    ... case that a real interrupt happens after the software disable was set. ... Actually we only need the resend for edge type interrupts. ... Marcin found that when he disables the irq line on the hardware level ... can you please try the patch below? ...
    (Linux-Kernel)
  • [patch] genirq: temporary fix for level-triggered IRQ resend
    ... ne2k driver _should_ be able to survive the spurious irq that happens. ... Subject: genirq: temporary fix for level-triggered IRQ resend ... case that a real interrupt happens after the software disable was set. ... Marcin found that when he disables the irq line on the hardware level ...
    (Linux-Kernel)
  • Re: 2.6.20->2.6.21 - networking dies after random time
    ... or is your network card stuck forever once it got into ... Subject: genirq: temporary fix for level-triggered IRQ resend ... case that a real interrupt happens after the software disable was set. ... Marcin found that when he disables the irq line on the hardware level ...
    (Linux-Kernel)
  • [PATCH] drivers/serial/sunzilog: Interrupt enable before ISR handler installed
    ... I have added a from line, comment and signed-off-by line to the attached patch file. ... The attached patch changes the interrupt enable sequence for the sunzilog ... handler has been installed. ... switch (cflag & CSIZE) { ...
    (Linux-Kernel)
  • Re: [PATCH]: Atmel Serial Console interrupt handler splitup
    ... So, to come to a conclusion about this complex patch series, I ... yesterday including inline are also included to make the set complete. ... this is the order in which the patches should be installed: ... + * receive interrupt handler. ...
    (Linux-Kernel)