Re: lockdep and threaded IRQs

From
David Brownell <hidden>
Date
2009-02-28 20:11:00
Also in
lkml
Reply to
Stefan Richter, 2009-02-28
On Saturday 28 February 2009, Stefan Richter wrote:
David Brownell wrote:
quoted
The other is that Linux needs real support for threaded
interrupts.  Almost every I2C (or SPI) device that raises
an IRQ needs its IRQ handler to run in a thread, and most
of them have the same type of workqueue-based hack to
get such a thread.  (Some others have bugs instead...)
Since when is having an IRQ handler scheduling a workqueue job a hack?
The only "hack" I recall mentioning was the need to
forcibly re-enable IRQs that lockdep wrongly disabled.

In kernels whose IRQ handlers don't sleep, we don't pretend that they
could; instead we defer sleeping work to a context which can sleep.

Or from another angle:  If a driver requires a kernel with sleeping IRQ
handlers, why submit it for inclusion into a kernel which does not
(yet)
provide nonatomic context to IRQ handlers?
Or from yet another angle:  how will progress ever happen
if nobody pushes the boundaries?  :)

We've known for ages that threaded IRQs will eventually
show up in mainline.  Better IMO to plan for that, and
expect minor changes to the drivers which have needed them
all along.

- Dave
Thread (96 messages) 96 messages, 12 authors, last reply 2009-07-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help