From patchwork Thu Sep 22 16:39:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 12985588 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 761D3C54EE9 for ; Thu, 22 Sep 2022 17:14:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C8F5E6B0075; Thu, 22 Sep 2022 13:14:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C3DD26B0078; Thu, 22 Sep 2022 13:14:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0588940007; Thu, 22 Sep 2022 13:14:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A18786B0075 for ; Thu, 22 Sep 2022 13:14:23 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 59FBEABBF1 for ; Thu, 22 Sep 2022 17:14:23 +0000 (UTC) X-FDA: 79940370006.28.4B7A81D Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by imf15.hostedemail.com (Postfix) with ESMTP id 59774A003B for ; Thu, 22 Sep 2022 17:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=9c9f/Z617NwlepBZ8kCvaLxh0DHSLLYncHvcWBGtmQo=; b=mF1BGQAVgB/KUAw3GuN21F8Wtl cdrZMERc1Et3ePJXPYhHZF1FgmkSRYVA8CRESucV43/HCdVHXqMEZjHPXg+n1crhdTSnAD8QJc1VB kMV2O1zdyGIS1Dyiom+jhIwA5QB1wrUc5rUoj3eQqqiSY3VqBq8uZR/EOKhxgYZj3qD/4p+n5MunC oIHCot5mpdPQla7j8EDFmituvNXooNTr8vmqUXFjMkauVEjIAjamxL5zC9bk3SDTYkfo1ZXdAtcWD VYQqeeq1ZWMWO6yJSsnakcbZ75C1u0QeFqluSTviT0F7Z0Z47P8lrJxVyB/MBN7G9/mVmeKWOcH11 REOZZAbQ==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1obPEh-00862e-7S; Thu, 22 Sep 2022 10:39:40 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1obPEb-0001s5-Rh; Thu, 22 Sep 2022 10:39:33 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org Cc: Christoph Hellwig , Greg Kroah-Hartman , Dan Williams , Jason Gunthorpe , =?utf-8?q?Christian_K=C3=B6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell , Stephen Bates , Logan Gunthorpe Date: Thu, 22 Sep 2022 10:39:26 -0600 Message-Id: <20220922163926.7077-9-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220922163926.7077-1-logang@deltatee.com> References: <20220922163926.7077-1-logang@deltatee.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, hch@lst.de, gregkh@linuxfoundation.org, jgg@ziepe.ca, christian.koenig@amd.com, ddutile@redhat.com, willy@infradead.org, daniel.vetter@ffwll.ch, jason@jlekstrand.net, dave.hansen@linux.intel.com, helgaas@kernel.org, dan.j.williams@intel.com, dave.b.minturn@intel.com, jianxin.xiong@intel.com, ira.weiny@intel.com, robin.murphy@arm.com, martin.oliveira@eideticom.com, ckulkarnilinux@gmail.com, jhubbard@nvidia.com, rcampbell@nvidia.com, sbates@raithlin.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH v10 8/8] ABI: sysfs-bus-pci: add documentation for p2pmem allocate X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663866863; a=rsa-sha256; cv=none; b=2v4SEfM/C4DO0M+Z5+Jx5CqVcZ1cWG0hIsPZFECUozvhiZYTBXNiVAPIyvzmEVDALI5mix /FMPi+IjT052VRuq+iqgEHuP4mRhFcyOc7IQvIWisClugm70nLNxQH3Zk/sQs8laIlhe96 0duLEmfJCHMTd0xHXM/qBp4kXKnR5B4= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=deltatee.com header.s=20200525 header.b=mF1BGQAV; dmarc=pass (policy=none) header.from=deltatee.com; spf=pass (imf15.hostedemail.com: domain of gunthorp@deltatee.com designates 204.191.154.188 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663866863; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9c9f/Z617NwlepBZ8kCvaLxh0DHSLLYncHvcWBGtmQo=; b=0slvy0kw3KeaW3/VaQy2QlbSFjHBZsMyva/W/Ons6SZDAoWfSgA1FPXq5N1r1udTJY4Pmc l9PSBxeuXIBOxwsCOU71hkkSRSWF5pSja7kXMOhzPwg2Kpk5/3oDxIVUCPCo5AOYseMQYc GmEipDYr6w7049HcgtttFyhV6YwyqhI= X-Stat-Signature: 8tjxk8z978s861h5bhwew9kz87kdm5hc X-Rspamd-Queue-Id: 59774A003B Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=deltatee.com header.s=20200525 header.b=mF1BGQAV; dmarc=pass (policy=none) header.from=deltatee.com; spf=pass (imf15.hostedemail.com: domain of gunthorp@deltatee.com designates 204.191.154.188 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-Rspamd-Server: rspam05 X-Rspam-User: X-HE-Tag: 1663866861-958230 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add documentation for the p2pmem/allocate binary file which allows for allocating p2pmem buffers in userspace for passing to drivers that support them. (Currently only O_DIRECT to NVMe devices.) Signed-off-by: Logan Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Greg Kroah-Hartman --- Documentation/ABI/testing/sysfs-bus-pci | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index 6fc2c2efe8ab..f4602b8d6e11 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci @@ -407,6 +407,16 @@ Description: file contains a '1' if the memory has been published for use outside the driver that owns the device. +What: /sys/bus/pci/devices/.../p2pmem/allocate +Date: August 2022 +Contact: Logan Gunthorpe +Description: + This file allows mapping p2pmem into userspace. For each + mmap() call on this file, the kernel will allocate a chunk + of Peer-to-Peer memory for use in Peer-to-Peer transactions. + This memory can be used in O_DIRECT calls to NVMe backed + files for Peer-to-Peer copies. + What: /sys/bus/pci/devices/.../link/clkpm /sys/bus/pci/devices/.../link/l0s_aspm /sys/bus/pci/devices/.../link/l1_aspm