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)
I wonder if "p2pdma" would be a more suggestive term? It's not really
the *memory* that is peer-to-peer; the peer-to-peer part is referring
to *access* to the memory.
@@ -82,6 +130,9 @@ static int pci_p2pmem_setup(struct pci_dev *pdev)
if (error)
goto out_pool_destroy;
+ if (sysfs_create_group(&pdev->dev.kobj, &p2pmem_group))
+ dev_warn(&pdev->dev, "failed to create p2p sysfs group\n");
Not sure the warning (by itself) is worthwhile. If we were going to
disable the feature if sysfs_create_group() failed, that's one thing,
but we aren't doing anything except generating a warning, which the
user can't really do anything with. If the user is looking for the
sysfs file, its absence will be obvious even without the message.