On 17-Jan-19 18:48, Jason Gunthorpe wrote: > On Thu, Jan 17, 2019 at 01:14:06AM -0800, Christoph Hellwig wrote: >> On Mon, Jan 14, 2019 at 11:53:08AM -0700, Jason Gunthorpe wrote: >>> 'coherent DMA' memory is a property of the cache and when it gets >>> remapped to userspace the special cache properties get lost. >> >> That is not the case. There are a few ways to implement coherent >> memory, with the most common ones being: >> >> a) do nothing (the x86 way) - this will just work from userspace >> b) remap the memory with an uncached bit in the PTE. dma_mmap_coherent >> will ensure this bit is also set for the userspace mapping. >> Everything will just work > > This I did not know, this driver was just calling io_remap_pfn_range, > I think. Right, I did not know this as well. Thanks Christoph! > > I'm not sure what it is even doing with this memory, mmaping system > pages from kernel to user is kind of backwards from the usual RDMA > driver flow.. We currently require both RQ and CQ to be physically contiguous. We will move the allocation to the userspace provider once we support virtually contiguous queues.