From patchwork Thu Dec 14 07:37:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 13492508 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 E92AAC4332F for ; Thu, 14 Dec 2023 07:38:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF59A8D009F; Thu, 14 Dec 2023 02:38:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AA4EF8D009C; Thu, 14 Dec 2023 02:38:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96D6E8D009F; Thu, 14 Dec 2023 02:38:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 876A88D009C for ; Thu, 14 Dec 2023 02:38:18 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4B205140C68 for ; Thu, 14 Dec 2023 07:38:18 +0000 (UTC) X-FDA: 81564620676.03.AF66FA9 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by imf13.hostedemail.com (Postfix) with ESMTP id BE89020011 for ; Thu, 14 Dec 2023 07:38:15 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=GxR21Dzn; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf13.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702539496; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=akSvxKH89lALLTdkFCxz3zg9y9c/WbifuO3VvS8K3bg=; b=jQfUFx5CSM+iDeoQ8rWNyIQ8Un9bdk9ChlrOpSokRsv5rcZpNDS7RtHV2eAthlevyFK374 96b3Ggr8hEWbMddRQSKMCJ/mpOCvuShwGYx6fbFJivrXfWLstRT2njAmKQKpFEf4XAPkdU kyWWvd1mAyPAHU8fPUN3S+zGm5H1P6I= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=GxR21Dzn; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf13.hostedemail.com: domain of vishal.l.verma@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702539496; a=rsa-sha256; cv=none; b=WCdA9Q99Vv6QJBHA8ey6dX1j3sYP5rIUtGp973TW8URt6VmDze/UUz0ejI6x6dyvtyhLAU X1XeKKd726pLhOZ4U6nCDTB3qZhzpPTQkGkQT0lYEXXJLeCHBg+zTUd4Aar0eWr9EaWqNm t7jw92VB2+A6qGSwYViTpI/dKCxYbzg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702539496; x=1734075496; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=s2pn4yZl0XYTp65Nn5lvuI7n/QI1GItpUEXHrwpjM9A=; b=GxR21DznRlBoXJ4Z+Ja1F583bzV5w42yC6ALIHFYcA0oiMau+CaGQrj8 uTnFhb1VIqu45/t5pSbyrROf4sAhAAxxxarXlV78KpxYfceR1zJwRbTbc nR7HD1pezsGFr0FCRzJfzgLe3zE98QygoCIigtC2O6+K8U++voyBZRcko LChRp0tlc+V5J6wWwoT61vJPlJ6WOdEhD5y1o8Y4jZXxuvC0Jcab4h3gr zLFiFWPc833zv4e02NBA15Xq+RJvuhynsfY1McL5o95+e3kYidZ+8kN7g BMWfNA6GG89se/ZTRVDUs+RNr9gzhvCuynipe1Cv9S8qrpKo/hVSko6/H A==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="481275514" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="481275514" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 23:38:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="723972059" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="723972059" Received: from llblake-mobl1.amr.corp.intel.com (HELO [192.168.1.200]) ([10.213.191.124]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 23:38:11 -0800 From: Vishal Verma Date: Thu, 14 Dec 2023 00:37:54 -0700 Subject: [PATCH v5 1/4] Documentatiion/ABI: Add ABI documentation for sys-bus-dax MIME-Version: 1.0 Message-Id: <20231214-vv-dax_abi-v5-1-3f7b006960b4@intel.com> References: <20231214-vv-dax_abi-v5-0-3f7b006960b4@intel.com> In-Reply-To: <20231214-vv-dax_abi-v5-0-3f7b006960b4@intel.com> To: Dan Williams , Vishal Verma , Dave Jiang , Andrew Morton , Oscar Salvador Cc: linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, David Hildenbrand , Dave Hansen , Huang Ying , Greg Kroah-Hartman , linux-mm@kvack.org X-Mailer: b4 0.13-dev-433a8 X-Developer-Signature: v=1; a=openpgp-sha256; l=5934; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=s2pn4yZl0XYTp65Nn5lvuI7n/QI1GItpUEXHrwpjM9A=; b=owGbwMvMwCXGf25diOft7jLG02pJDKlVGx4VxXeVLzrzw/Rzevi5Y9KH3GbOf7RvZum9o3Ouq E1sv6TV21HKwiDGxSArpsjyd89HxmNy2/N5AhMcYeawMoEMYeDiFICJ2Isx/OHn+2U8ea3O/vwu Tesphzmq5lYYaJ1peJkQ9+FcOvPT7GhGhs2HTzq8qm+IF3kimLko9v/0y/bhllrfTy0IN5ZJ/lB 7hQsA X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Rspamd-Queue-Id: BE89020011 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 7mqfw5yspabx6d17r36fbir93fs35cs9 X-HE-Tag: 1702539495-136472 X-HE-Meta: U2FsdGVkX19+cm6liGzcFnx7QdWZdnjWKiiMvmEu5KZC1/OcRXaoY1A7gfxnwGj5+vCbLXbyCU2ryxiSQR3irzLJR6JFoxk26ddAZKJyqh6RmYcZ3kP/VbifepZt3gcbz31NC0st4ldzz/Nz4V+O1Wmo6WUCTpSYrO76MGgnhEu/Tkjpis9A/CFoHoITKyoT92TmsOl+JJ1f+uDlRwf3NPFri6EID97UunI72w7XbaUvSuj3JfJoCa0L/7AxLI+Ynqn7rJQEcXp1M2Ch8R1BpWj22zm+Pb5Y104qVRnb31APxYh4hLbUSj2Vs+s2utMWIdMQLQYtrq4eZvG81ya6xUPbFCRbC7DYPiAOIRGeKd2qxM6luqwPIZhAypGxOQwDTVgqaaUPT1Oqsp1Rw/OXCeFxb0Zvli6Px+4IfJwpqPICxA5xcSHgxPA4JpB8QBhahQvRDV7voEOevjGitCz8r/sMFeH9IPUm9tAhE1Ne1eucP/Psxdd346I5ANz1XOXPYmAyoGF66JftAEf19y+eGutDGUdhI9a+hurcr+GYXD2qCyuCfHxrrb9yZCZA2KERwiJW+wMavq6Y03JU8aOLtSZeGWbcI2tsfnHBrYAcpCdEMK75/uaILYCIyCT/N/oAC8AxmzFq+pNwYXJTyAkhHYDGku1fBZN0KGM7UPR/DLVmOwvWH1edxD4/mN6BYFHYIe/mXH9Pj9/x87qtaMIlub5uhclhDnGePsLN5neRypd6BZO+eXX+L7JvvAJZhvTdcKoCNYgSPou9END+f83Kauuw6gDsQ49gZsujuCMJgtYYu1sYp5UjWKJOxBVGs836qF/+KubKaLNbZMqIiz5xV9CudCrxnELS+wem+YP1Ztq07t88KuoP7QDr2CRbN5iONov0jSehuqw2fWGeVTXbGgqRjo0JHP4TNVXNrbO6WhaCGHBeuCstEwygqo0e4u+tGR58zEJBRZSF8WTGlW3 2JpbDhkL kYfLJcdlaES1UVDImLRh98N58bxwFzQGvG0WHI9kAyD/Ie7N7Hvm965blC/Sz4huGgXpxvAjUDsPSapnZQwAsxrFptvHwE7HccC7S3yY3gXte+ACG6p4KZYYq9Kj8BSQSMOB7TqYcwKmCWQzyGXJOMkZVMwR3r0aQwb4oX9myzp4w9q2TDtB/r8WuL8aHCyKlfgBf 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: List-Subscribe: List-Unsubscribe: Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal Verma --- Documentation/ABI/testing/sysfs-bus-dax | 136 ++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-dax b/Documentation/ABI/testing/sysfs-bus-dax new file mode 100644 index 000000000000..6359f7bc9bf4 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-dax @@ -0,0 +1,136 @@ +What: /sys/bus/dax/devices/daxX.Y/align +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RW) Provides a way to specify an alignment for a dax device. + Values allowed are constrained by the physical address ranges + that back the dax device, and also by arch requirements. + +What: /sys/bus/dax/devices/daxX.Y/mapping +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (WO) Provides a way to allocate a mapping range under a dax + device. Specified in the format -. + +What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/start +What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/end +What: /sys/bus/dax/devices/daxX.Y/mapping[0..N]/page_offset +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RO) A dax device may have multiple constituent discontiguous + address ranges. These are represented by the different + 'mappingX' subdirectories. The 'start' attribute indicates the + start physical address for the given range. The 'end' attribute + indicates the end physical address for the given range. The + 'page_offset' attribute indicates the offset of the current + range in the dax device. + +What: /sys/bus/dax/devices/daxX.Y/resource +Date: June, 2019 +KernelVersion: v5.3 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The resource attribute indicates the starting physical + address of a dax device. In case of a device with multiple + constituent ranges, it indicates the starting address of the + first range. + +What: /sys/bus/dax/devices/daxX.Y/size +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RW) The size attribute indicates the total size of a dax + device. For creating subdivided dax devices, or for resizing + an existing device, the new size can be written to this as + part of the reconfiguration process. + +What: /sys/bus/dax/devices/daxX.Y/numa_node +Date: November, 2019 +KernelVersion: v5.5 +Contact: nvdimm@lists.linux.dev +Description: + (RO) If NUMA is enabled and the platform has affinitized the + backing device for this dax device, emit the CPU node + affinity for this device. + +What: /sys/bus/dax/devices/daxX.Y/target_node +Date: February, 2019 +KernelVersion: v5.1 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The target-node attribute is the Linux numa-node that a + device-dax instance may create when it is online. Prior to + being online the device's 'numa_node' property reflects the + closest online cpu node which is the typical expectation of a + device 'numa_node'. Once it is online it becomes its own + distinct numa node. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/available_size +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The available_size attribute tracks available dax region + capacity. This only applies to volatile hmem devices, not pmem + devices, since pmem devices are defined by nvdimm namespace + boundaries. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/size +Date: July, 2017 +KernelVersion: v5.1 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The size attribute indicates the size of a given dax region + in bytes. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/align +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The align attribute indicates alignment of the dax region. + Changes on align may not always be valid, when say certain + mappings were created with 2M and then we switch to 1G. This + validates all ranges against the new value being attempted, post + resizing. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/seed +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The seed device is a concept for dynamic dax regions to be + able to split the region amongst multiple sub-instances. The + seed device, similar to libnvdimm seed devices, is a device + that starts with zero capacity allocated and unbound to a + driver. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/create +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (RW) The create interface to the dax region provides a way to + create a new unconfigured dax device under the given region, which + can then be configured (with a size etc.) and then probed. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/delete +Date: October, 2020 +KernelVersion: v5.10 +Contact: nvdimm@lists.linux.dev +Description: + (WO) The delete interface for a dax region provides for deletion + of any 0-sized and idle dax devices. + +What: $(readlink -f /sys/bus/dax/devices/daxX.Y)/../dax_region/id +Date: July, 2017 +KernelVersion: v5.1 +Contact: nvdimm@lists.linux.dev +Description: + (RO) The id attribute indicates the region id of a dax region.