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

2018-09-25 Thread Logan Gunthorpe
On 2018-09-25 12:31 p.m., Bart Van Assche wrote: > On Tue, 2018-09-25 at 12:15 -0600, Logan Gunthorpe wrote: >> On 2018-09-25 11:29 a.m., Bart Van Assche wrote: >>> On Tue, 2018-09-25 at 10:22 -0600, Logan Gunthorpe wrote: @@ -83,9 +132,14 @@ static int pci_p2pdma_setup(struct pci_dev *pdev

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

2018-09-25 Thread Bart Van Assche
On Tue, 2018-09-25 at 12:15 -0600, Logan Gunthorpe wrote: > On 2018-09-25 11:29 a.m., Bart Van Assche wrote: > > On Tue, 2018-09-25 at 10:22 -0600, Logan Gunthorpe wrote: > > > @@ -83,9 +132,14 @@ static int pci_p2pdma_setup(struct pci_dev *pdev) > > > > > > pdev->p2pdma = p2p; > > > > > > +

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

2018-09-25 Thread Logan Gunthorpe
On 2018-09-25 11:29 a.m., Bart Van Assche wrote: > On Tue, 2018-09-25 at 10:22 -0600, Logan Gunthorpe wrote: >> @@ -83,9 +132,14 @@ static int pci_p2pdma_setup(struct pci_dev *pdev) >> >> pdev->p2pdma = p2p; >> >> +error = sysfs_create_group(&pdev->dev.kobj, &p2pmem_group); >> +

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

2018-09-25 Thread Bart Van Assche
On Tue, 2018-09-25 at 10:22 -0600, Logan Gunthorpe wrote: > @@ -83,9 +132,14 @@ static int pci_p2pdma_setup(struct pci_dev *pdev) > > pdev->p2pdma = p2p; > > + error = sysfs_create_group(&pdev->dev.kobj, &p2pmem_group); > + if (error) > + goto out_pool_destroy; > + >

[PATCH v7 02/13] PCI/P2PDMA: Add sysfs group to display p2pmem stats

2018-09-25 Thread Logan Gunthorpe
Add a sysfs group to display statistics about P2P memory that is registered in each PCI device. Attributes in the group display the total amount of P2P memory, the amount available and whether it is published or not. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas --- Documentation/ABI/