Re: Infrastructure for zerocopy I/O

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Nov 2015, Christoph Hellwig wrote:

> On Mon, Nov 16, 2015 at 08:03:12PM +0100, Steinar H. Gunderson wrote:
> > The original use case: DVB capture on embedded devices.
> > 
> > My use case: USB3 uncompressed HD video capture (from multiple cards).
> > 
> > Both of these hit (beyond the speed boost from zerocopy) the problem that
> > as time goes by, memory gets more fragmented and usbfs fails allocation.
> > Allocating memory up-front solves that.
> 
> As said I think you should just use get_user_pages() on user memory,
> and bounce buffer if it doesn't fit the DMA mask.
> 
> Thіs also allows the user to use hugetlbs if they need large contiguous
> allocations for performance reasons.

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.

Is there an API for allocating user memory below 4 GB?  Would a new 
MMAP flag be acceptable?

Alan Stern

--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux