usb2 bulk read optimization ?
Hans Petter Selasky
hselasky at c2i.net
Fri Nov 28 10:03:48 PST 2008
On Friday 28 November 2008, Thierry Herbelot wrote:
> Hello,
>
> another day, another question :
>
> I'm done converting an old "userland driver" to usb2 and libusb20 - and it
> works ! (using the libusb API, for the time being).
>
> The application is a data capture from a bulk endpoint, and I can't get
> more than around 8 Mbps. The data are formatted as URBs of 40 kbytes.
>
> This may be expected, as the machine is an oldish Pentium-III, with an
> additional Acer-based USB-2 extension card.
>
> (still, I have recompiled the -current kernel without the INVARIANTS and
> WITNESS options)
>
> I have had a quick look at the code of libusb20 and tried an increase of
> bufsize in usb_get_transfer_by_ep_no, but with no discernable improvements.
>
> Any idea ?
Hi Thierry,
You have found the correct place to tune the buffer size. Are you sure that
your application is also doing similiarly large bulk transfers?
Are you sure that the transfer speed limitation is not a limitation of your
USB device?
Keep in mind: The EHCI has an interrupt clamp of 4000-8000 interrupts /
second.
--HPS
More information about the freebsd-usb
mailing list