On Fri, 22 Mar 2002, David Brownell wrote:

>> 1. The problem, according to my crude user-space measurements using
>>    gettimeofday(), is that a bulk transfer of 4096 bytes takes
>>    approximately 70 milliseconds to complete.  Does this seem
>>    reasonable?  It seems like a very long time for such a small amount
>>    of data.
>
>Yes it does seem rather long.  4KBytes is 64 max size packets
>(of 64 bytes each) which would (optimistically) fit neatly into
>four frames (19 packets each) with space left over ... one frame
>per millisecond, by definition.
>
>So you're seeing about 64 milliseconds too long, if you assume
>best case ... and typical case, on an unloaded USB, should be
>only a few frames short of best case even with a slow HC.
>
>I'll not speculate where that extra delay comes from, but I'd
>suspect it's outside of the USB layer (so bigger I/O sizes
>could give you better throughput).

If the userspace program does any sleeping at all (even usleep) it
will be asleep for at least 10ms, due to the kernel (scheduler) timer
being periodic every 10ms.  Still, 70ms is quite long, unless you're
sleeping 6 different times...


>> 2. The windows software, according to sniffusb, is using much bigger
>>    bulk transfer packets -- at least 64 kB.  But the usbdevfs
>>    interface specifically limits the packet size to 4096 bytes.  Why
>>    is this limit in place?  Shouldn't I be able to generate bulk
>>    transfers in larger sizes?
>
>I've also wondered where that 4KB limit comes from, it's
>too small to get adequate bulk throughput.  And it's not
>even applied uniformly throughout "usbfs" (the new name
>for "usbdevfs" -- unrelated to "devfs").

Arbitrary according to Tom

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=97394223225582&w=2


-- 
Dan Streetman
[EMAIL PROTECTED]
--------------------------------------------------
186,282 miles per second:
It isn't just a good idea, it's the law!


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to