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

next in thread | previous in thread | raw e-mail | index | archive | help
Le Friday 28 November 2008, Hans Petter Selasky a écrit :
> 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?

I'm doing "usb_bulk_read(handle, ep, data, size, 500);" with size around 
40kbytes.
>
> Are you sure that the transfer speed limitation is not a limitation of your
> USB device?

this USB device is known, with a different, open-source, OS, to handle around 
240Mbps (30Mbyte/s, but probably not on this oldish machine). the device is 
high-speed compliant, but can only do bulk transfers (maybe isochronous could 
have been better, but that's technically not possible)
>
> Keep in mind: The EHCI has an interrupt clamp of 4000-8000 interrupts /
> second.

OK : I would *very much* like to see a transfer rate of 4k*40kbyte/sec
>
> --HPS

	Thanks for the answers

	TfH



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