On Sun, Sep 29, 2013 at 2:07 PM, Ming Lei <tom.leiming@xxxxxxxxx> wrote: > On Sun, Sep 29, 2013 at 7:51 PM, Markus Rechberger > <mrechberger@xxxxxxxxx> wrote: > >> >> I agree, but here not only small buffers are the problem, also latency. >> >> I will send another patch version which overrides the SG transfer once >> a preallocated buffer is submitted. The current patch will only use >> the pre-allocated buffers if the buffer size is smaller than 15-16k. > > If you put much attention to performance & latency, I am wondering why > you don't write a kernel mode usb driver to fix your problem? With usbfs > and user mode driver, both performance and latency won't be very good: Userspace drivers work with all systems from Linux 2.6.15 on in our case. One driver for all. USBFS has been designed to write such drivers, and we are using it. > - URB can only be submitted in process context with context switch cost > - URB complete is notified by signal, which might introduce much latency > With one kernel mode driver, you can get better performance/latency much > easily. > nearly all embedded systems are usually shipped without third party kernel modules and in some cases they don't even provide the kernel source (additionally said I do not want to provide kernel drivers for each system it's a big waste of time, not even thinking about the time trying to get the kernel sources for a system). We have our glue module which we could ship but once a manufacturer decides to update their system the game starts again the driver would not load (they do not ship any modules which do not belong to their system). The current problems are maybe less than 0.1% on our side but we also want to have them fixed. Markus > > Thanks, > -- > Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html