On 8/8/07, Alan Stern <[EMAIL PROTECTED]> wrote: > On Wed, 8 Aug 2007, Gabriel Maganis wrote: > > > My goal was to run a benchmark on how long the packets took to go from > > my computer to the usb device. I tried to do it like "start = > > timenow(); usb_control_msg(); end = timenow();" but the results I get > > are not so stable and I don't think running the code for large n can > > give me a good measure. Any idea on how else I might do it? > > Use a USB bus analyzer if you really want to see the low-level details. > However the USB spec includes lots of information about timing. You > should be able to calculate the transfer time for a packet directly. > > Besides, it's still not clear what good such a benchmark would be. > There are plenty of other variables besides the time required to > transmit a packet: > > Time to submit a request to the host controller driver; > > Time for the host controller hardware to see the request > and begin transmitting the packets; > > Time for the device to process and acknowledge the data; > > Time for the host controller to raise an interrupt request; > > Time for the interrupt to be processed. > > Out of all that, the time needed for actually sending a packet is > pretty small. > > Alan Stern > >
Correct. I was hoping disabling preemption can keep those things somewhat constant but looking at the list you gave, it seems the time to travel over the cable is negligible. I am trying to see if a USB extension cable can increase the time from my computer to the device. Is that unlikely to be visible from a kernel module even if I use the TSC? Thanks, Gabriel ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel