Re: workqueue thing

Stefan Richter
2009-12-23T13:35:14Z

Jeff Garzik wrote:
> On 12/23/2009 03:41 AM, Peter Zijlstra wrote:
>> On Wed, 2009-12-23 at 01:13 -0500, Jeff Garzik wrote:
>>> We are dealing with situations where drivers are using workqueues to
>>> provide a sleep-able context, and trying to solve problems related to
>>> that.
>>
>> So why are threaded interrupts not considered? Isn't the typical atomic
>> context of drivers the IRQ handler?
>
>
> I don't see a whole lot of driver authors rushing to support threaded
> interrupts. It is questionable whether the myriad crazy IDE interrupt
> routing schemes are even compatible. Thomas's Mar 23 2009 email says
> "the primary handler must disable the interrupt at the device level"
> That is not an easy request for all the hardware libata must support.
>
> But the most obvious reason is also the most compelling: Tejun's work
> maps precisely to libata's needs. And his work would seem to mesh well
> with other drivers in similar situations.

Exactly; threaded interrupts are not a solution for much of what
workqueues, slow-work, async... are used for and cmwq would be (more)
useful for.

In case of FireWire for example, each FireWire bus ( = FireWire link
layer controller) is associated with a single interrupt handler, yet
contains several DMA units for very different purposes (input vs.
output, isochronous vs. asynchronous); but more importantly, one link
layer controller is merely the gateway to 0...n FireWire peer nodes
(cameras, storage devices etc.). Everything of what happens at a
somewhat higher level needs concurrency per FireWire peer, not per
FireWire bus.
--
Stefan Richter
-=====-==--= ==-- =-===