Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-09-01 Thread Christoph Hellwig
On Fri, Aug 31, 2018 at 09:48:40AM -0600, Logan Gunthorpe wrote: > Pretty easy. P2P detection is pretty much just pci_p2pdma_distance() , > which has nothing to do with the ZONE_DEVICE support. > > (And the distance function makes use of a number of static functions > which could be combined into

Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-31 Thread Logan Gunthorpe
On 31/08/18 10:19 AM, Jonathan Cameron wrote: > This feels like a somewhat simplistic starting point rather than a > generally correct estimate to use. Should we be taking the bandwidth of > those links into account for example, or any discoverable latencies? > Not all PCIe switches are alike

Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-31 Thread Jonathan Cameron
On Thu, 30 Aug 2018 12:53:40 -0600 Logan Gunthorpe wrote: > Some PCI devices may have memory mapped in a BAR space that's > intended for use in peer-to-peer transactions. In order to enable > such transactions the memory must be registered with ZONE_DEVICE pages > so it can be used by DMA

Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-31 Thread Logan Gunthorpe
On 31/08/18 02:04 AM, Christian König wrote: > Am 30.08.2018 um 20:53 schrieb Logan Gunthorpe: >> Some PCI devices may have memory mapped in a BAR space that's >> intended for use in peer-to-peer transactions. In order to enable >> such transactions the memory must be registered with ZONE_DEVICE

Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-31 Thread Christian König
Am 30.08.2018 um 20:53 schrieb Logan Gunthorpe: Some PCI devices may have memory mapped in a BAR space that's intended for use in peer-to-peer transactions. In order to enable such transactions the memory must be registered with ZONE_DEVICE pages so it can be used by DMA interfaces in existing

[PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-30 Thread Logan Gunthorpe
Some PCI devices may have memory mapped in a BAR space that's intended for use in peer-to-peer transactions. In order to enable such transactions the memory must be registered with ZONE_DEVICE pages so it can be used by DMA interfaces in existing drivers. Add an interface for other subsystems to