RFC USB: HCD/EHCI: giveback of URB in tasklet context
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 4 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/4] USB: HCD/EHCI: giveback of URB in tasklet context
Quoted 8 lines · On Tuesday 11 June 2013 13:40:20 Ming Lei wrote:
Quoted 1 line · Alan Stern
On Mon, 10 Jun 2013, Ming Lei wrote:
If
complete()callback runs in one tasklet context,spin_lock()insidecomplete()is enough, just like hard irq, the tasklet itself is disabled duringcomplete(), if the percpu tasklet is converted to single tasklet. So no problem when the lock is to protect shared resources betweencomplete().
We also have exclusion between complete() and other contexts, i.e. timers.
Quoted 8 lines
When the lock is to protect shared resources between
complete()and non-IRQ context, currentlyspin_lock_irqsave()is used in non-IRQ context, which is enough to prevent tasklet from being run on the CPU, so no problem for this situation too.When all HCDs support to run URB giveback in tasklet context, we can change all spin_lock_irq*() to
spin_lock()in driversURB->complete(), and in other places, the spin_lock_irq*() can be changed tospin_lock_bh().
Even now we cannot guarantee that all calls to complete() are in irq. There is the case of HCD hotunplug and other cases, like timeouts. They will have to be verified.
Regards
Oliver