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
- [RFC PATCH 07/15] iommu/dma: Support PCI P2PDMA pages in d... Logan Gunthorpe
- [RFC PATCH 08/15] nvme-pci: Check DMA ops when indicating ... Logan Gunthorpe
- [RFC PATCH 14/15] PCI/P2PDMA: Introduce pci_mmap_p2pmem() Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA: Introduce pci_mmap_... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA: Introduce pci_m... Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA: Introduce p... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA: Introdu... Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA: In... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Logan Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Jason Gunthorpe
- Re: [RFC PATCH 14/15] PCI/P2PDMA... Logan Gunthorpe
- [RFC PATCH 12/15] block: Set FOLL_PCI_P2PDMA in __bio_iov_... Logan Gunthorpe
- [RFC PATCH 09/15] nvme-pci: Convert to using dma_map_sg fo... Logan Gunthorpe
- [RFC PATCH 11/15] iov_iter: Introduce iov_iter_get_pages_[... Logan Gunthorpe
- [RFC PATCH 05/15] dma-direct: Support PCI P2PDMA pages in ... Logan Gunthorpe
- [RFC PATCH 06/15] dma-mapping: Add flags to dma_map_ops to... Logan Gunthorpe
- [RFC PATCH 02/15] PCI/P2PDMA: Attempt to set map_type if i... Logan Gunthorpe