schedule_work and speedtch.c
Roman Kagan
rkagan at mail.ru
Sun Apr 17 15:38:10 EDT 2005
On Sun, Apr 17, 2005 at 08:15:25PM +0200, Duncan Sands wrote:
> > OK so how about the patch below? It changes the heavy_init stuff to use
> > a workqueue. The subdrivers can also use it for status polling, it's a
> > matter of replacing schedule_work() by queue_work() and
> > flush_scheduled_work() by flash_workqueue().
>
> Actually, I was thinking of one workqueue for the whole of usbatm, not
> one per device. Isn't one per device overkill? On the other hand, it
> avoids the problem of multiple devices being initialized serially,
> rather than in parallel.
Exactly that was my reasoning. The available drivers use timeouts of 2
seconds which is enough for even two instances to stomp on each other
when run off a common workqueue, while per device workqueues don't seem to cost
much.
> Also, with workqueues, we lose the possibility
> of quickly quitting heavy_init on disconnect by sending a signal...
Yes this is an important point I've missed. I need to think it over...
Cheers,
Roman.
More information about the Usbatm
mailing list