On Thu, Oct 28, 2004, Oliver Neukum <[EMAIL PROTECTED]> wrote: > Am Donnerstag, 28. Oktober 2004 17:01 schrieb Alan Stern: > > On Thu, 28 Oct 2004, Axel Waggershauser wrote: > > > I have to write a custom driver for a FX2 based camera module that > > > should be able to reach a bulk throughput of about 30 MBytes/sec from > > > the device to user space memory. The available CPU performance is less > > > than a 1GHz VIA EDEN. Is the libusb capable to provide this performance? > > > > > > If not, I guess I would have to write a driver that definitely makes > > > usage of scatter-gather lists to avoid unnecessary cpu involvement, is > > > that right? Is there a good starting point (documentation/examples) for > > > a "state of the art" sg-based usb driver? > > > > > > Thanks, > > > Axel > > > > I have no idea how fast libusb will run on your system, but it shouldn't > > be hard for you to test it. > > 30 MB/s is 45% of nominal PCI bandwidth and 50% of nominal USB2 throughput. > It would be interesting to see what libusb can do, but nobody should even > be slightly disappointed or surprised if it turns out to be significantly > less.
It probably will be significantly less. We have buffer size issues with usbfs and libusb. Older versions of libusb used the synchronous bulk read/write calls and those were limited to a page size. We've since switched to using asynchronous, URB based calls, which allow us buffer sizes of up to 16KB, but I think that will still limit us to quite a bit under 30MB/s. We can go even further by using multiple URBs and queuing them, but libusb doesn't currently do that. JE ------------------------------------------------------- This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel