From: Christoph Hellwig > Sent: 18 November 2015 14:02 > On Tue, Nov 17, 2015 at 02:07:58PM -0500, Alan Stern wrote: > > If we really want to do zerocopy I/O then we should not use a bounce > > buffer. But the only way to avoid bounce buffers may be to give user > > programs a way of allocating memory pages below 4 GB, because lots of > > USB hardware can only do 32-bit DMA. > > But any system worth it's money these days has an IOMMU.
If a system has an iommu, then the cost of updating the iommu itself becomes significant. This is on top of any TLB and cache operations that are required for typical page loaning schemes. One scheme that might work (if you have an open fd into the usb driver) is to do an mmap() request on the usb driver that will make it allocate DMA-able memory and map it into the applications address space. The USB transfer buffers can then be arranged to be in this area. David -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html