Messages in this thread | | | Date | Thu, 29 Jul 2004 16:21:00 -0400 | Subject | Re: [patch] IRQ threads | From | Scott Wood <> |
| |
On Thu, Jul 29, 2004 at 09:33:41PM +0200, Ingo Molnar wrote: > > * Scott Wood <scott@timesys.com> wrote: > > > > Also, why the enable_irq() change? > > > > If you mean the do_startup_irq() change, [...] > > i mean the change below - why do irqthreads necessiate it?
The intent is to make enable_irq() robust against calls while the thread is still running/pending (such as if the thread has lower priority than the task that calls enable_irq()). This implies that the preceding disable was of the _nosync() variety.
I believe we saw drivers/net/8390.c doing this, and it was causing an interrupt storm because, at the time (this was over a year ago), actionless irqs (which this IRQ was, because the IRQ was still in progress) had end() called, unmasking it again. The IRQ was level triggered, and thus the handler never got a chance to run.
That wouldn't happen with the current code, because it checks for THREADPENDING || THREADRUNNING before calling end() in really_do_IRQ(), so now all the check does is save the wasted time of one bad interrupt each time it happens.
-Scott - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |