Skip to contentSkip to conversation

usb: xhci: Support running urb giveback in tasklet context

DISCUSSION Mathias Nyman 1 participant 1 message Feb 28, 2019 USB

lore
Share & tools
lore
#0 lore raw

Hi

Quoted 7 lines · Suwan Kim

Patch "USB: HCD: support giveback of URB in tasklet context" introduced giveback of urb in tasklet context. [1] This patch was applied to ehci but not xhci. [2] It significantly reduces the hard irq time of xhci. Especially for the uvc driver, the hard irq including the uvc complete function runs quite long (about 300-350us in my Thinkpad s440 laptop with webcam) but applying this patch reduces the hard irq time of xhci to about 18-30us.

Sorry about the late reply.
Can you recall any reason why this wasn't applied to xhci back then?

xhci is doing a lot in hard interrupt context, and reducing that would be a good idea. Another option to look at is using threaded interrupts for xhci.

We might however be opening a can of worms with this, the impact is unknown.

How much testing was done with URB return in tasklet for SS devices?

Would be nice to test this out on a bit wider audience before applying it.

-Mathias