Re: questions about give back urb in tasklet

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

 



On Wed, Mar 19, 2014 at 9:34 PM, vichy <vichy.kuo@xxxxxxxxx> wrote:
> hi Ming
>>>
>>> in http://permalink.gmane.org/gmane.linux.usb.general/89363
>>>
>>> I have some questions about this patch.
>>> 1. is there patch or kernel config I can use to measure man/avage usb
>>> irq time consuming like the above link show
>>
>> One approach I like to use is trace event.
> Would you please let us how to to use trace event for calculate
> max/average usb irq time?

You can enable irq_handler_entry and irq_handler_exit event, then
write a script easily to figure out the time consumed in ehci irq handler,
see Documentation/trace/events.txt of linux kernel for detailed steps.

>
>>
>>>
>>> 2. I see this patch is roll back in commit
>>> "c04ee4b1136e462722567cf6e76bb35a181574a7" and intend to be ready in
>>> 3.13-rc1
>>> Is there special reason why we need to roll back?
>>
>> Yes, the revert revert can enable to run completion handler in BH,
>> isn't that what you need?
> YES, what I need is try to see whether my problem will be solved if
> running completion handlers in BH.
>
> At beginning, the "revert" let me think there are something wrong
> after we put completion in BH.
> And we need to revert it back to "put completion in irq"
>
> so the revert mean "put completion in BH", right?

Yes, it is a revert revert.

>
>>
>> But actually the local interrupt is still disabled during completion
>> because we need to convert spin_lock in all current usb drivers
>> to spin_lock_irqsave() first.
> Would you please let me know the function or source you mentioned?

The local interrupt is disabled during completion handler in
__usb_hcd_giveback_urb().

>
> BTW, why I cannot see xhci add HCD_BH?

There might be some reasons:

- in previous following up discussion, Alan thought it should
be easier to just split the hcd interrupt handler into two parts

- as I said, spin_lock() isn't converted to spin_lock_irqsave()
in drivers' completion handler yet

- maybe no one really care the time in which local interrupt is
disabled by USB completion handler.(That might be true
because USB devices are commonly used in personal
computer, not in big server product)

> is there some reason xhci cannot put completion in BH?

IMO, the completion handler should be put into tasklet, and
can be done. If you like, you can take time to do that.


Thanks,
--
Ming Lei
--
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