Re: [PATCH rdma-next 11/13] RDMA/efa: Add EFA verbs implementation

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

 



On Mon, Jan 14, 2019 at 04:17:57PM +0200, Gal Pressman wrote:
> On 04-Jan-19 05:51, Jason Gunthorpe wrote:
> > Also you can't mmap to user space dma_coherent memory, so this entire
> > thing needs reworking to use non-coherent memory and proper barriers
> > like all the other drivers.
> 
> Hi Jason,
> Why can't coherent DMA memory be mmapped to userspace? (BTW, looks like cxgb4
> does that).

Don't assume our drivers are right.

'coherent DMA' memory is a property of the cache and when it gets
remapped to userspace the special cache properties get lost. 

There may be some way to preserve them, I'm not sure, as this is not
something we do in RDMA.

We don't support the use-case of non-coherent DMA from userspace, so
if you need a kernel coherent DMA allocation it is not supported.

> Also, if the streaming DMA mapping is used, how can the userspace
> call dma_sync_*?  As far as I can tell, the userspace
> udma_*_device_barrier doesn't seem to replace it.

It can't. platforms that require privileged functionality to do
dma_sync are not supported by RDMA. Other platforms are required to
implement their functionality via barriers.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux