Re: [PATCH v4 00/14] Copy Offload in NVMe Fabrics with P2P PCI Memory

2018-05-07 Thread Bjorn Helgaas
On Mon, Apr 23, 2018 at 05:30:32PM -0600, Logan Gunthorpe wrote: > Hi Everyone, > > Here's v4 of our series to introduce P2P based copy offload to NVMe > fabrics. This version has been rebased onto v4.17-rc2. A git repo > is here: > > https://github.com/sbates130272/linux-p2pmem pci-p2p-v4 > ...

Re: [PATCH v4 06/14] PCI/P2PDMA: Add P2P DMA driver writer's documentation

2018-05-07 Thread Bjorn Helgaas
On Mon, Apr 23, 2018 at 05:30:38PM -0600, Logan Gunthorpe wrote: > Add a restructured text file describing how to write drivers > with support for P2P DMA transactions. The document describes > how to use the APIs that were added in the previous few > commits. > > Also adds an index for the PCI

Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-05-07 Thread Bjorn Helgaas
[+to Alex] Alex, Are you happy with this strategy of turning off ACS based on CONFIG_PCI_P2PDMA? We only check this at enumeration-time and I don't know if there are other places we would care? On Mon, Apr 23, 2018 at 05:30:36PM -0600, Logan Gunthorpe wrote: > For peer-to-peer transactions to

Re: [PATCH v4 03/14] PCI/P2PDMA: Add PCI p2pmem dma mappings to adjust the bus offset

2018-05-07 Thread Bjorn Helgaas
s/dma/DMA/ (in subject) On Mon, Apr 23, 2018 at 05:30:35PM -0600, Logan Gunthorpe wrote: > The DMA address used when mapping PCI P2P memory must be the PCI bus > address. Thus, introduce pci_p2pmem_[un]map_sg() to map the correct > addresses when using P2P memory. > > For this, we assume that an

Re: [PATCH v4 01/14] PCI/P2PDMA: Support peer-to-peer memory

2018-05-07 Thread Bjorn Helgaas
On Mon, Apr 23, 2018 at 05:30:33PM -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 09/12] PCI: remove CONFIG_PCI_BUS_ADDR_T_64BIT

2018-04-20 Thread Bjorn Helgaas
On Sun, Apr 15, 2018 at 04:59:44PM +0200, Christoph Hellwig wrote: > This symbol is now always identical to CONFIG_ARCH_DMA_ADDR_T_64BIT, so > remove it. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: Bjorn Helgaas <bhelg...@google.com> Please merge

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-26 Thread Bjorn Helgaas
On Mon, Mar 26, 2018 at 12:11:38PM +0100, Jonathan Cameron wrote: > On Tue, 13 Mar 2018 10:43:55 -0600 > Logan Gunthorpe wrote: > > It turns out that root ports that support P2P are far less common than > > anyone thought. So it will likely have to be a white list. > > This

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-23 Thread Bjorn Helgaas
On Fri, Mar 23, 2018 at 03:59:14PM -0600, Logan Gunthorpe wrote: > On 23/03/18 03:50 PM, Bjorn Helgaas wrote: > > Popping way up the stack, my original point was that I'm trying to > > remove restrictions on what devices can participate in > > peer-to-peer DMA. I th

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-23 Thread Bjorn Helgaas
On Thu, Mar 22, 2018 at 10:57:32PM +, Stephen Bates wrote: > > I've seen the response that peers directly below a Root Port could not > > DMA to each other through the Root Port because of the "route to self" > > issue, and I'm not disputing that. > > Bjorn > > You asked me for a

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-14 Thread Bjorn Helgaas
On Wed, Mar 14, 2018 at 10:17:34AM -0600, Logan Gunthorpe wrote: > On 13/03/18 08:56 PM, Bjorn Helgaas wrote: > > I agree that peers need to have a common upstream bridge. I think > > you're saying peers need to have *two* common upstream bridges. If I > > understand cor

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-13 Thread Bjorn Helgaas
On Tue, Mar 13, 2018 at 05:21:20PM -0600, Logan Gunthorpe wrote: > On 13/03/18 05:08 PM, Bjorn Helgaas wrote: > > On Tue, Mar 13, 2018 at 10:31:55PM +, Stephen Bates wrote: > > If it *is* necessary because Root Ports and devices below them behave > > differently than i

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-13 Thread Bjorn Helgaas
On Tue, Mar 13, 2018 at 10:31:55PM +, Stephen Bates wrote: > >> It sounds like you have very tight hardware expectations for this to work > >> at this moment. You also don't want to generalize this code for others and > >> address the shortcomings. > > No, that's the way the community has

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-05 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 12:13:10PM -0700, Logan Gunthorpe wrote: > > > On 01/03/18 11:02 AM, Bjorn Helgaas wrote: > > > void pci_enable_acs(struct pci_dev *dev) > > > { > > > + if (pci_p2pdma_disable_acs(dev)) > > > + return; > >

Re: [PATCH v2 01/10] PCI/P2PDMA: Support peer to peer memory

2018-03-01 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 11:14:46PM +, Stephen Bates wrote: > > I'm pretty sure the spec disallows routing-to-self so doing a P2P > > transaction in that sense isn't going to work unless the device > > specifically supports it and intercepts the traffic before it gets to > > the port. > >

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-01 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 06:54:01PM +, Stephen Bates wrote: > Thanks for the detailed review Bjorn! > > >> +Enabling this option will also disable ACS on all ports behind > >> +any PCIe switch. This effictively puts all devices behind any > >> +switch into the same IOMMU group. >

Re: [PATCH v2 01/10] PCI/P2PDMA: Support peer to peer memory

2018-03-01 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 11:55:51AM -0700, Logan Gunthorpe wrote: > Hi Bjorn, > > Thanks for the review. I'll correct all the nits for the next version. > > On 01/03/18 10:37 AM, Bjorn Helgaas wrote: > > On Wed, Feb 28, 2018 at 04:39:57PM -0700, Logan Gunthorpe wrote: >

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-01 Thread Bjorn Helgaas
On Wed, Feb 28, 2018 at 04:40:00PM -0700, Logan Gunthorpe wrote: > For peer-to-peer transactions to work the downstream ports in each > switch must not have the ACS flags set. At this time there is no way > to dynamically change the flags and update the corresponding IOMMU > groups so this is done

Re: [PATCH v2 03/10] PCI/P2PDMA: Add PCI p2pmem dma mappings to adjust the bus offset

2018-03-01 Thread Bjorn Helgaas
On Wed, Feb 28, 2018 at 04:39:59PM -0700, Logan Gunthorpe wrote: > The DMA address used when mapping PCI P2P memory must be the PCI bus > address. Thus, introduce pci_p2pmem_[un]map_sg() to map the correct > addresses when using P2P memory. > > For this, we assume that an SGL passed to these

Re: [PATCH v2 02/10] PCI/P2PDMA: Add sysfs group to display p2pmem stats

2018-03-01 Thread Bjorn Helgaas
On Wed, Feb 28, 2018 at 04:39:58PM -0700, Logan Gunthorpe wrote: > Attributes display the total amount of P2P memory, the amount available > and whether it is published or not. Can you add enough text here to make the body of the changelog complete in itself? That might mean just repeating the

Re: [PATCH v2 01/10] PCI/P2PDMA: Support peer to peer memory

2018-03-01 Thread Bjorn Helgaas
s/peer to peer/peer-to-peer/ to match text below and in spec. On Wed, Feb 28, 2018 at 04:39:57PM -0700, 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

Re: [PATCH 01/12] pci-p2p: Support peer to peer memory

2018-01-04 Thread Bjorn Helgaas
On Thu, Jan 04, 2018 at 12:01:26PM -0700, 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 04/12] pci-p2p: Clear ACS P2P flags for all client devices

2018-01-04 Thread Bjorn Helgaas
[+cc Alex] On Thu, Jan 04, 2018 at 12:01:29PM -0700, Logan Gunthorpe wrote: > When the ACS P2P flags are set in the downstream port of the switch, > any P2P TLPs will be sent back to the root complex. The whole point of > the P2P work is to have TLPs avoid the RC seeing it may not support > P2P

Re: [PATCH 02/12] pci-p2p: Add sysfs group to display p2pmem stats

2018-01-04 Thread Bjorn Helgaas
On Thu, Jan 04, 2018 at 12:01:27PM -0700, Logan Gunthorpe wrote: > Attributes display the total amount of P2P memory, the ammount available > and whether it is published or not. s/ammount/amount/ (also below) > Signed-off-by: Logan Gunthorpe > --- >

Re: [PATCH 01/12] pci-p2p: Support peer to peer memory

2018-01-04 Thread Bjorn Helgaas
Run "git log --oneline drivers/pci" and follow the convention. I think it would make sense to add a new tag like "PCI/P2P", although "P2P" has historically also been used in the "PCI-to-PCI bridge" context, so maybe there's something less ambiguous. "P2PDMA"? When you add new files, I guess

Re: [PATCH 9/9] kernel-api.rst: fix a series of errors when parsing C files

2017-03-30 Thread Bjorn Helgaas
de/linux/clk.h:134: WARNING: Inline emphasis start-string without > end-string. > ./ipc/util.c:477: ERROR: Unknown target name: "s". > > Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com> Acked-by: Bjorn Helgaas <bhelg...@google.com> # for d

Re: [PATCH V2 2/3] PCI: add an API to get node from vector

2017-02-24 Thread Bjorn Helgaas
On Wed, Feb 01, 2017 at 09:53:15AM -0800, Shaohua Li wrote: > Next patch will use the API to get the node from vector for nvme device > > Signed-off-by: Shaohua Li <s...@fb.com> Acked-by: Bjorn Helgaas <bhelg...@google.com> Sorry I missed this; I normally work from th

Re: [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity

2016-11-08 Thread Bjorn Helgaas
On Mon, Nov 07, 2016 at 10:47:36AM -0800, Christoph Hellwig wrote: > From: Christogh Hellwig > > Some drivers (various network and RDMA adapter for example) have a MSI-X > vector layout where most of the vectors are used for I/O queues and should > have CPU affinity assigned to

Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

2016-11-08 Thread Bjorn Helgaas
pumask argument that has never been used. > If we ever need it in the future we can pass it through struct > irq_affinity. > > Signed-off-by: Christogh Hellwig <h...@lst.de> s/Christogh/Christoph/ (also above, and maybe other patches too?) Acked-by: Bjorn Helgaas <bhe

Re: [PATCH 4/7] pci/msi: Propagate irq affinity description through the MSI code

2016-11-08 Thread Bjorn Helgaas
ectors() > Signed-off-by: Christogh Hellwig <h...@lst.de> Acked-by: Bjorn Helgaas <bhelg...@google.com> > --- > drivers/pci/msi.c | 62 > +-- > 1 file changed, 33 insertions(+), 29 deletions(-) > > diff --

Re: [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity()

2016-11-08 Thread Bjorn Helgaas
spreading). > > Signed-off-by: Christogh Hellwig <h...@lst.de> Acked-by: Bjorn Helgaas <bhelg...@google.com> > +int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int > min_vecs, > +unsigned int max_vecs, unsigned int flags, > +

Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev

2016-11-08 Thread Bjorn Helgaas
s/pci/PCI/ (in subject) On Mon, Nov 07, 2016 at 10:47:41AM -0800, Christoph Hellwig wrote: > This has never been used, and now is totally unreferenced. Nuke it. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: Bjorn Helgaas <bhelg...@google.com> > --- &g