Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp645915imm; Fri, 21 Sep 2018 06:07:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbYyb1v3BS1a8UDLbzEu9JiTeDu7Iq9h1tXQsoLs9rSB98C1iVVAn0XEgN8s3/yrViCgFPZ X-Received: by 2002:a62:5b85:: with SMTP id p127-v6mr46564962pfb.33.1537535278654; Fri, 21 Sep 2018 06:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537535278; cv=none; d=google.com; s=arc-20160816; b=Eh/gND7Pt2s6AwqTKV6CbLgfvvWgpVrf+Ln2kUMisDZL3TlePhca2DQH2YFHlllOGP 8x8Lp5zNmMyXAHpSdfPJH52XY4mBLMLiBgT7HO95WQmDQH/EjteNWAQBL03lGSbmXylD z/CJPmuXAyvWix1Q0O80iHum0iWcYsSzdb2DEIQII+rnOU30V+tWFO7IaqHxqPz85S+v 0P7ZvPOYppc+ojqCjQWc3tmlyQPDZu/WRPimNzMC4GvsHSk4sIc/d7leh94Abo4W13DL JMfVhIMdYVa3CW/KLdGtm2EozjVgzEjCE4wG+Kcq15Y5O7JOk8DY8rZ/EwaqxBQ2cbah gd8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5AUAk4wsk9s/VlYUs98McsVZDOTqEjTIGUgTaRlQI0M=; b=rhVEiOoZZPj1KHxZj8b6FZYsU8DsFH3/UrsG+os5CCwuPOzTXnY6VH8wWItAMFrqUg zAANHXj9JKfbMVQCsRJF7JcQE+PjB56hz7S1BXLCBEQFvHBpkuyGayq9FMQPG66CiZ06 I2VszP3MU84fjbXt7kQm01xALY4R4HIAJYNTvjvl0nEVxWX7g/465yo8Yhp6tuGLuAuq BGO40LT7Ce5o0+1UrqoeNsewUYIXDgOopvhJNipSEmHArXOOxlHDuE4gGFvXRcNHtyn6 TXrieqDt1QxlXM15gfZnBdqm489hzuEMOfNV6QDUMjNL/uYzipQ56gVZPyB8HssN2ZK/ MEHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vUUS8O9C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t32-v6si26026381pgl.484.2018.09.21.06.07.33; Fri, 21 Sep 2018 06:07:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vUUS8O9C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390000AbeIUSzz (ORCPT + 99 others); Fri, 21 Sep 2018 14:55:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:47358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728098AbeIUSzz (ORCPT ); Fri, 21 Sep 2018 14:55:55 -0400 Received: from localhost (252.sub-174-234-146.myvzw.com [174.234.146.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F230E21532; Fri, 21 Sep 2018 13:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537535227; bh=V7nu7ZMW4zuFHjhx59YSChDKK9b/IAgKtndorfVR/Ok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vUUS8O9CHdmjvfJAXPtaMD/H1c6/5NCqPs4bel7WS3hWDgkel+hsMeRuFyq/zZMqO L7HfRQMgQ7NQ/PClcisbAw9cDKwLQMQ9oRuSIfAYtPCd7DDABbC1PbLvopiII8lH9x 73CHKEuJywxehvfwYeWSLDUOKm9AISWuLT7mtO5w= Date: Fri, 21 Sep 2018 08:07:05 -0500 From: Bjorn Helgaas To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?iso-8859-1?Q?K=F6nig?= , Jens Axboe Subject: Re: [PATCH v6 02/13] PCI/P2PDMA: Add sysfs group to display p2pmem stats Message-ID: <20180921130705.GF224714@bhelgaas-glaptop.roam.corp.google.com> References: <20180913001156.4115-1-logang@deltatee.com> <20180913001156.4115-3-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180913001156.4115-3-logang@deltatee.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Bjorn Helgaas > +What: /sys/bus/pci/devices/.../p2pmem/available > +Date: November 2017 > +Contact: Logan Gunthorpe > +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 > +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 > +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.