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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 12, 2018 at 06:11:45PM -0600, Logan Gunthorpe wrote:
> 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 <logang@xxxxxxxxxxxx>

Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

> +What:		/sys/bus/pci/devices/.../p2pmem/available
> +Date:		November 2017
> +Contact:	Logan Gunthorpe <logang@xxxxxxxxxxxx>
> +Description:
> +		If the device has any Peer-to-Peer memory registered, this
> +	        file contains the amount of memory that has not been
> +		allocated (in decimal).
> +
> +What:		/sys/bus/pci/devices/.../p2pmem/size
> +Date:		November 2017
> +Contact:	Logan Gunthorpe <logang@xxxxxxxxxxxx>
> +Description:
> +		If the device has any Peer-to-Peer memory registered, this
> +	        file contains the total amount of memory that the device
> +		provides (in decimal).

Maybe reorder this so the "size" (total amount) is documented before
"available" (some subset of "size")?

> +
> +What:		/sys/bus/pci/devices/.../p2pmem/published
> +Date:		November 2017
> +Contact:	Logan Gunthorpe <logang@xxxxxxxxxxxx>
> +Description:
> +		If the device has any Peer-to-Peer memory registered, this
> +	        file contains a '1' if the memory has been published for
> +		use inside the kernel or a '0' if it is only intended
> +		for use within the driver that published it.

It doesn't read quite right to talk about "use within the driver that
*published* it".  Is it really published in that case?  That sounds more
like "private".  I expected something like the following (but I don't claim
to understand the whole use model here):

  ... this file contains a '1' if the memory has been published for use
  outside the driver that owns the device.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux