[RFC 7/7] NVMe: CMB on DMA-BUF

Haggai Eran haggaie at mellanox.com
Tue Aug 2 00:10:14 PDT 2016


On ב', 2016-08-01 at 08:52 -0700, Christoph Hellwig wrote:
> On Mon, Aug 01, 2016 at 09:57:33AM +0300, Haggai Eran wrote:
> > 
> > Allocate a CMB region to user-space as a DMA-BUF object.
> NACK.  Absolutely no way we're going to export a low-level device
> specific feature to userspace like that.  If you want to DMA to
> the CMB do it from the kernel, and for that we'll need a proper
> block device level API.

The reason I thought this idea might work is because of the responses
Stephen got for his attempt to use ZONE_DEVICE for things like the CMB.
The problem with that is that the way RDMA registration works with
get_user_pages means that the CPU also gets access to the CMB and
sometimes you don't want that. DMA-BUF can solve that nicely in that it
doesn't require mapping it to the CPU - a driver can attach to it
directly.

Anyway, I understand exposing the CMB directly might be a little too
low level. What do you think would work better? Something like
direct_access that returns bus addresses instead of pfns?

Thanks,
Haggai


More information about the Linux-nvme mailing list