Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Nov 2008 19:05:59 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Cc:        Thierry Herbelot <thierry.herbelot@free.fr>
Subject:   Re: usb2 bulk read optimization ?
Message-ID:  <200811281906.00913.hselasky@c2i.net>
In-Reply-To: <200811281606.51927.thierry.herbelot@free.fr>
References:  <200811281606.51927.thierry.herbelot@free.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811281906.00913.hselasky>