Re: [RFC PATCH 0/4] USB: HCD/EHCI: giveback of URB in tasklet context

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

 



On Monday 10 June 2013 10:03:00 Alan Stern wrote:
> [Thomas and Steve, please see the question below.]
> 
> On Mon, 10 Jun 2013, Ming Lei wrote:
> 

> That isn't clear.  It is documented that USB completion handlers are 
> called with local interrupts disabled.  An IRQ arriving before the 
> tasklet starts up might therefore be serviced during the short interval 
> before the tasklet disables local interrupts, but if that happens it 
> would mean that the completion handler would be delayed.

That is what tasklets do by definition, isn't it?
 
> In effect, you are prioritizing other IRQs higher than USB completion
> handlers.  Nevertheless, the total time spent with interrupts disabled
> will remain the same.

It pobably slightly increases. You have colder caches twice.
And potentially you swich CPUs.
 
> (There's one other side effect that perhaps you haven't considered.  
> When multiple URBs are addressed to the same endpoint, their completion 
> handlers are called in order of URB completion, which is the same as 
> the order of URB submission unless an URB is cancelled.  By delegating 
> the completion handlers to tasklets, and particularly by using per-CPU 
> tasklets, you may violate this behavior.)

This is quite serious. It mustn't happen.

	Regards
		Oliver

--
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