On Thu, Apr 12, 2012 at 02:29:04AM +0200, Joaquim Duran wrote: > Dear All, > > My name is Joaquim Duran, I've just subscribed to this mailing list. > > In my company, we're developing a board to capture data from several > sensors, the board is managed by a microcontroler. It is connected to > a device with an ARM based OMAP3730 processor from LogicPD using an > USB interface. DM3730 board runs Linux 3.0.0 Note that 3.0.0 is quite obsolete and out-of-date. Please update to the latest 3.0-stable release if you are stuck at 3.0, and ideally, it would be good to move to 3.3 if at all possible. > and acts as host, while > the capture board acts as client. Currently, capture board is > identified as a modem, it is managed by USB ACM driver, and the host > interface is managed by the isp1760 driver. The capture board should > send 200 Kbytes/second to the host. The transfer mode is bulk. The > host, to read the data, consumes 66% of CPU: 30% of the application to > read the data to user space, and 36% for the kworker thread. > Currently, the CPU load is too high for our purposes. So: How did you measure these numbers? > - From the USB perspective, is it possible to change the transfer mode > from bulk to isochronous? The kernel could identify the device? That's up to the device to define, you can't change this on the host side, sorry. And that will not help with your CPU utilization either. > - From the kernel side, how can I check if an USB device is using DMA > or not? How can I activate DMA for the previous drivers (ACM and > isp1760), if the DMA is not enabled? Can I reserve memory for DMA > transfers? The USB device driver doesn't do DMA, that's for the USB host controller driver. That would be up to the isp1760 driver to do. And if possible, it should do it "automatically", nothing extra for you to do at all. > - From user application, currently it is reading the data with the > 'read' system call. Could 'mmap' or 'relayfs' be used to improve the > data transfer between kernel and application? Is the data transfer from kernel to userspace really the bottleneck here? Odds are your host controller driver is just "slow" and taking up lots of CPU time. And no, sorry, mmap doesn't work with USB devices like ACM devices, which are sending a stream of data to the host. I think there have been a lot of improvements in the speed and throughput of the ACM driver in newer kernels, it might be worth while to try a newer one (remember, 3.0.0 is almost a year old now) and see if that helps you out. greg k-h -- 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