lkml.org 
[lkml]   [2018]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 02/13] PCI/P2PDMA: Add sysfs group to display p2pmem stats
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@deltatee.com>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> +What: /sys/bus/pci/devices/.../p2pmem/available
> +Date: November 2017
> +Contact: Logan Gunthorpe <logang@deltatee.com>
> +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@deltatee.com>
> +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@deltatee.com>
> +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.

\
 
 \ /
  Last update: 2018-09-21 15:09    [W:0.231 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site