Re: [PATCH v1] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Aug 2013, Ming Lei wrote:

> > By the way, even though it's a little late to ask this...  Why did you
> > decide to move only the giveback routine into a tasklet, instead of
> > moving the entire interrupt handler?
> 
> Looks below reasons in my mind before preparing the tasklet patch:
> 
> 1, from my observation, on ARM, the most time-consuming part is dma
> mapping, unmapping and data copy over coherent memory, so moving
> giveback out of interrupt handler can decrease USB irq handling time a lot.

Of course, this would remain true either way.

> 2, moving giveback out of irq handler can be done in usbcore, so changes
> can be minimized.

This seems to be the most important factor.  When you think about it,
though, does it really minimize the changes?  Consider all the other
adjustments we had to make to ehci-hcd: the interrupt QH unlink change
and the isochronous stream stuff (which also affects the usb-audio
drivers).

I'm starting to think that moving the entire handler to a tasklet would 
have been better.

> 3, driver's complete() may do many driver specific things which may increase
> irq handling time randomly, so moving complete() to tasklet can help to
> decrease HCD irq handling time.

This is like the first reason.

> Also moving only the giveback routine into a tasklet can avoid dropping
> HCD private lock during irq handler, which may simplify HCD code, and
> I have figured out ehci cleanup patches for this.

I don't think we should make these changes.  It's okay to keep the 
private lock during the giveback call, but let's not remove the other 
things.

My feeling is that at some point we may indeed want to move the entire 
handler to a tasklet or a threaded IRQ.  If that happens, all those 
simplifications would need to be undone.  Better not to do them in the 
first place, since they add very little overhead.

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux