Re: Linux UVC driver can not handle urb_submit error

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

 



Dear Alan,


the attached is log file about cpu cycle measurement. there are 2
files included in tar file.
1. 0603_log_3.txt is cpu cycle data that I dump when urb submit error occur
2. scan_periodic.c is the code that shows where I put enter point and
exit point.
I set a flag to disable update CPU Cycle count when urb submit error.
the data is saved into array .
"big for loop" ,"restart label","itd_complete" has a 4096 elements
array to save data, respectively.
the data type is :
struct for_loop_stat{
	unsigned long long cpu_cycle_count;
	unsigned int now_uframe;
	unsigned int clock;
	unsigned int modified;
};
the element "modified" is used for restart_lable only.
if modified is "1", it means the data from "restart" to "goto restart"
in 0603_log_3.txt, the first line shows the index of each array when
the error is occur.


Best Regards,
Soho



2011/6/3 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Fri, 3 Jun 2011, Soho Soho123 wrote:
>
>> > I don't understand.  If the camera is disconnected from the USB bus,
>> > there's nothing to test!
>>
>> Soho: I mean :there is not any streaming data to client(networking).
>> Not USB disconnect.
>
> Oh, okay.  Now I understand.
>
>> > Maybe you can run a test where you print out the CPU cycle counter:
>> >
>> >        Just before the start of the big "for" loop in scan_periodic()
>> >        (also print out the values of now_uframe and clock);
>> >
>> >        Just after the "restart:" statement label (also print out the
>> >        value of now_uframe);
>> >
>> >        And just after the call to itd_complete().
>> >
>> > Try this for the 2.6.30 kernel and also with the updated ehci-hcd
>> > driver.  Seeing the numbers might help me to figure out the problem.
>> >
>> Soho: Let me explain how to measure CPU cycle that we used:
>>           there is a "enter point" and a "exit point" , then we
>> calculate cpu cycle :
>>           count in exit point - count in enter point
>>           "enter point" and "exit point" should be a pair, such that
>> we can know the count from begin to end
>>
>> Could you explain the meaning of yours? As my understanding,
>> 1. I put the enter point in before "big" for loop, but where  I can
>> put the exit point for the first pair?
>> 2. I put the enter point after the line "restart" label, but where I
>> can put the exit point for this pair?
>
> Maybe you can do this:  Before the big "for" loop, put an exit point,
> then print out the cycle count, now_uframe, and clock, then put an
> enter point.
>
> Similarly, just after the "restart:" statement label, put an exit
> point, then print out the cycle count and now_uframe, then put an enter
> point.  And just after the call to itd_complete(), put an exit point,
> then print out the cycle count, then put an enter point.
>
> An enter point would not be matched with any particular exit point.
> But it should still work (except perhaps for the very first time an
> exit point is reached).
>
> Alan Stern
>
>

Attachment: 0603_CPU_Cycle.tar.gz
Description: GNU Zip compressed data


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

  Powered by Linux