Re: [PATCH 1/2] Shared USB host controller throughput statistics.

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

 



On Wed, 29 Apr 2009, Sarah Sharp wrote:

> > What you really want to do is accumulate lengths as URBs complete, and
> > reset the total to 0 (and reset the start time) after every read.  
> > Which means you don't need a ring buffer at all.  And you don't need to 
> > store a delta time, only a start time.
> 
> I think I understand your proposal.  I think it has a flaw because the
> bus may be idle for a long period of time.  If you keep the sum of the
> three transfer lengths and the start time for them, when the reader asks
> for the statistics after a long period of inactivity, they will receive
> falsely low statistics.

Right.  Whether this is a flaw or a feature is up to you.  You said 
that you wanted to measure _throughput_ -- and it the bus is idle for a 
long period of time then the thoughput will naturally be low.  :-)
If the reader is careful to bracket a period of high activity, the 
numbers will be more meaningful.  

In other words, whether you're measuring throughput or bandwidth is 
more up to the caller than to this code.

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