Hi,

I have a problem with inadequate throughput when submitting bulk urbs
with transfer buffers greater than about 128kB. I have written a simple
usb driver to access our proprietary device. The device has a "testing"
mode, in which it dumps data to its 64 byte bulk endpoint as fast as I
can transfer it to the host. I need to request single transfers of up to
512kB. I allocate 512kB memory with __get_free_pages( GFP_KERNEL, 7 )
and pass this buffer with a single usb_submit_urb(). I wrote a simple
test program reading 1MB of data repeatedly with increasing packet size.
The output looks like this:

blocksize: 256, count: 4096 speed: 249.846 [kB/s]
blocksize: 512, count: 2048 speed: 495.986 [kB/s]
blocksize: 1024, count: 1024 speed: 512.617 [kB/s]
blocksize: 2048, count: 512 speed: 673.838 [kB/s]
blocksize: 4096, count: 256 speed: 803.929 [kB/s]
blocksize: 8192, count: 128 speed: 831.394 [kB/s]
blocksize: 16384, count: 64 speed: 854.226 [kB/s]
blocksize: 32768, count: 32 speed: 879.15 [kB/s]
blocksize: 65536, count: 16 speed: 889.844 [kB/s]
blocksize: 131072, count: 8 speed: 905.443 [kB/s]
blocksize: 262144, count: 4 speed: 205.194 [kB/s]
blocksize: 524288, count: 2 speed: 114.73 [kB/s]


This looks quite reasonable to me, except the last two lines, showing a
drastic drop of throughput from 905kB/s to 205 kB/s when increasing the
urb-transfer-buffer-size from 128kB to 256kB.

The system looks like this:
kernel 2.6.0 with the uhci-hcd module driving a Via controller

(lspci -v)
00:11.2 USB Controller: VIA Technologies, Inc. USB (rev 23) (prog-if 00
[UHCI])
        Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
        Flags: bus master, medium devsel, latency 32, IRQ 11
        I/O ports at c400 [size=32]
        Capabilities: [80] Power Management version 2

I tried the new usb_buffer_map() dma mechanism without success, it had
no influence.

I had the same driver running on my laptop with the uhci driver as well.
It basically showed the same problem, just that every throughput value
was somewhat higher (the maximum throughput was over 1000kB/s).

Has anyone any idea what the problem might be, how to solve it or work
around it? Why is there such a "big" difference in maximum throughput
between my desktop machine and my laptop, is it possible that the
desktop hardware is actually not capable of getting the theoretical
1MB/s through the wire?

Thanks, Axel.

[As I am not subscribed to linux-usb-devel, please reply to my address
as well ([EMAIL PROTECTED]).]



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to