Re: [RFC 7/7] NVMe: CMB on DMA-BUF
From: Haggai Eran <hidden>
Date: 2016-08-02 07:10:14
Also in:
linux-nvme, linux-pci
On ב', 2016-08-01 at 08:52 -0700, Christoph Hellwig wrote:
On Mon, Aug 01, 2016 at 09:57:33AM +0300, Haggai Eran wrote:quoted
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,
HaggaiN�����r��y���b�X��ǧv�^�){.n�+����{��ٚ�{ay�
ʇڙ�,j��f���h�����/oSc��ڳ9�u�����&jw��(�階�ݢj"���m�����z�ޖ���f���h���~�m�