On Fri, 23 Aug 2013, Matthieu CASTET wrote: > Le Thu, 22 Aug 2013 21:39:17 +0100, > Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> a �it : > > > This patch divides ehci-hcd's interrupt handler into a top half and a > > bottom half, using a tasklet to execute the latter. > > > > The conversion is very straightforward. The only subtle point is that > > we have to ignore interrupts that arrive while the tasklet is running > > (i.e., from another device on a shared IRQ line). > > > Do you have any reason to use a tasklet instead of a thread for > handling the bottom half ? Yes. Measurements a few weeks ago showed that using a threaded handler significantly decreased the throughput for USB mass-storage devices. > We do some embedded product and we saw some scenario where usb stack and > drivers can do lot's of processing in irq context. For example video > uvc driver do a copy of the current image in the urb completion > handler. And that's harm real time. The uvcvideo driver could always move its processing to a work queue or kernel thread. > Moving to tasklet will solve only a part of the problem : other irq > won't be delayed by the usb irq handler. > But realtime threads will still be preempted by tasklets. On the other hand, kernels with the RT patches don't have this problem. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html