Re: Linux UVC driver can not handle urb_submit error

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

 



Dear Alan,

Thanks a lot for your comments!
In advance, we have further question about scan_periodic(). we can see
several time for "restart" label. The count is about 11 ~ 23. As your
comment, "it should run only twice" ===> does it mean: the first time
"modified" is true, then goto restart, in 2nd, "modified" is false
(all of itd has complete), then go next, right?
So, we can see the cpu cycle is very much when the count of restart is
increase. Do you have idea about this phenomenon?

Thanks again!!


Best Regards,
Soho

2011/5/31 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Tue, 31 May 2011, Soho Soho123 wrote:
>
>> Dear Alan,
>>
>> After tracing the flow, and we do the measurement about cpu cycles for
>> function in ehci irq path. We find the function scan_periodic(), in
>> for loop, case Q_TYPE_ITD will occupy much cpu cycles. It will
>> increase irq latency for ehci.
>
> Good, you found the source of your problem.
>
>> below is the issue that increase irq latency:
>> 1. when in case Q_TYPE_ITD , it will run itd_complete() for URB complete.
>
> Yes.  The rest of the code in the Q_TYPE_ITD case (that is, everything
> except the itd_complete() call) should run very fast.
>
>> 2.  if modified is true, then it will goto restart, then case
>> Q_TYPE_ITD will run again, it is repeatly.
>
> Actually it should run only twice.  The second time through,
> itd_complete() will not be called and so modified will not be true.
>
>> 3. Sometime, we can see uvc driver uvc_video_decode_isoc() will take
>> much cpu cycle,too. Since uvc driver decode data in complete call back
>> function.
>
> That sounds like the real cause of the latency.
>
>> Our question:
>> is it possible to modify flow of uvc driver? Since in complete call
>> back function, it will do decode and re-submit new urb. it will take
>> more time, right?
>
> I don't know anything about the uvcvideo driver.  You should ask
> driver's maintainer (CC'ed).
>
>> is it possible to reduce the time for case Q_TYPE_ITD?
>
> If you look carefully, you'll probably find that most of the time is
> used by uvcvideo.  I don't think the code in ehci-hcd can be improved
> very much.
>
>> Note:
>> the test condition:
>> ip camera configuration: 1280x720, 30fps
>>
>> Could you kindly help to give us the hints for the enhancement iso schedule?
>
> If the real problem is in uvcvideo, changing ehci-hcd won't help.
>
> 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