[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03032637-0826-da76-aec2-121902b1c166@deltatee.com>
Date: Fri, 6 Nov 2020 12:44:59 -0700
From: Logan Gunthorpe <logang@...tatee.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-block@...r.kernel.org, linux-pci@...r.kernel.org,
linux-mm@...ck.org, iommu@...ts.linux-foundation.org,
Stephen Bates <sbates@...thlin.com>,
Christoph Hellwig <hch@....de>,
Dan Williams <dan.j.williams@...el.com>,
Christian König <christian.koenig@....com>,
Ira Weiny <iweiny@...el.com>,
John Hubbard <jhubbard@...dia.com>,
Don Dutile <ddutile@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
Daniel Vetter <daniel.vetter@...ll.ch>
Subject: Re: [RFC PATCH 14/15] PCI/P2PDMA: Introduce pci_mmap_p2pmem()
On 2020-11-06 12:30 p.m., Jason Gunthorpe wrote:
>> I certainly can't make decisions for code that isn't currently
>> upstream.
>
> The rdma drivers are all upstream, what are you thinking about?
Really? I feel like you should know what I mean here...
I mean upstream code that actually uses the APIs that I'd have to
introduce. I can't say here's an API feature that no code uses but the
already upstream rdma driver might use eventually. It's fairly easy to
send patches that make the necessary changes when someone adds a use of
those changes inside the rdma code.
>> Ultimately, if you aren't using the genpool you will have to implement
>> your own mmap operation that somehow allocates the pages and your own
>> page_free hook.
>
> Sure, the mlx5 driver already has a specialized alloctor for it's BAR
> pages.
So it *might* make sense to carve out a common helper to setup a VMA for
P2PDMA to do the vm_flags check and set VM_MIXEDMAP... but besides that,
there's no code that would be common to the two cases.
>> I also don't expect this to be going upstream in the near term so don't
>> get too excited about using it.
>
> I don't know, it is actually not that horrible, the GUP and IOMMU
> related changes are simpler than I expected
I think the deal breaker is the SGL hack and the fact that there are
important IOMMU implementations that won't have support.
Logan
Powered by blists - more mailing lists