From patchwork Fri Dec 15 05:25:26 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: 13493998 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 4A45CC10F13 for ; Fri, 15 Dec 2023 05:25:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB4EA8D0113; Fri, 15 Dec 2023 00:25:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D3E278D0103; Fri, 15 Dec 2023 00:25:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B69AD6B00BE; Fri, 15 Dec 2023 00:25:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9901F8D0103 for ; Fri, 15 Dec 2023 00:25:42 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 769B71C161D for ; Fri, 15 Dec 2023 05:25:42 +0000 (UTC) X-FDA: 81567915324.29.FB4672A Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by imf15.hostedemail.com (Postfix) with ESMTP id 51955A0008 for ; Fri, 15 Dec 2023 05:25:40 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=khx1FmTY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf15.hostedemail.com: domain of vishal.l.verma@intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=vishal.l.verma@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702617940; a=rsa-sha256; cv=none; b=mryNVKW6UIfUjAjD89JGwvkkg8MlZQaCUTunEyfpsvk2+dYJ92Zx8K29vzJzm2YyvLrw9f 6aZ9y6B17HbxKR00OvC7UAutoMBOXV0PmVtY/U+ZTgboRZrqNppwdm135b8OR5AWH8otZC 9NNNbSXVWt1F4uNShLBLBEt+QKvYh5w= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=khx1FmTY; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf15.hostedemail.com: domain of vishal.l.verma@intel.com designates 134.134.136.100 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=1702617940; 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=TLzUvAV4j9FAhcXyhDkLOLhWLa0O3DiE3FI/6fsDGHsQWTMkuKREyO77iUlqD/fWq+j1zv 82uP2hKJSSUiM91IQ21dm6Khao6OKHg0TyRf3uEgDlQgnKC1oWt70K8DSoCqla+CjlL57n 6flNuPCkYBr7kGllKbI2fLhbqxi04PI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702617940; x=1734153940; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=s2pn4yZl0XYTp65Nn5lvuI7n/QI1GItpUEXHrwpjM9A=; b=khx1FmTYZ9dpb9hoBdNnu3iIZwjRSYKozaeaZ3VWwqCmPsohI9Jsiuy6 iuFwucEMnoYxZTSNGJreABZuknUBMjR0tqnvuwQU/j55G8jqvj/V0/9WB Xc9u0pIbaI9hngEoLRycwysfFlxDn6/KG+7c9c0o8kQXWBBTChdpiCzhM QlHB4icGwaizyGcnyQDHAY5jlkYQOVF8KkctjpLOPuxw4X4HSGz9YDbEX JpOS50Jkrbk/V3Ri0MEmBKi82Env1xVobIUdK7F9X/xDh9nrHsgPmg7Ae bAmPxTN6dW2/YAZIPHDxWz2aUn4I5NNXJ6vqGCxmN1NEYfi9/fzOaSZYx g==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="461695020" X-IronPort-AV: E=Sophos;i="6.04,277,1695711600"; d="scan'208";a="461695020" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 21:25:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="808847933" X-IronPort-AV: E=Sophos;i="6.04,277,1695711600"; d="scan'208";a="808847933" Received: from mmtakalk-mobl.amr.corp.intel.com (HELO [192.168.1.200]) ([10.212.109.101]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 21:25:37 -0800 From: Vishal Verma Date: Thu, 14 Dec 2023 22:25:26 -0700 Subject: [PATCH v6 1/4] Documentatiion/ABI: Add ABI documentation for sys-bus-dax MIME-Version: 1.0 Message-Id: <20231214-vv-dax_abi-v6-1-ad900d698438@intel.com> References: <20231214-vv-dax_abi-v6-0-ad900d698438@intel.com> In-Reply-To: <20231214-vv-dax_abi-v6-0-ad900d698438@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=owGbwMvMwCXGf25diOft7jLG02pJDKnVj/0r9Ttm7/2+yP7HJW9hJf/0P4+efS1lffUjJ6Pgg 9WZDomFHaUsDGJcDLJiiix/93xkPCa3PZ8nMMERZg4rE8gQBi5OAZhIRDQjwxbWjft2Rj4KrVI6 9EGhPeCulr7/NHHe8/q6zTfk/Hx4Ghn+KcSHRwasT3++S+N9wN7MdKFvWmf5J5rMl49/ZXFIy1u eEwA= X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 51955A0008 X-Stat-Signature: 55ex5qyfasrb41r6g9kf3bd3s6gozwmg X-HE-Tag: 1702617940-94013 X-HE-Meta: U2FsdGVkX1/akVINijIGzLQIA9yNHHGCoML/566tg5M2pDb6Dn5V0eCP4kt8WaIfg2O6pR6QkjwVqojEmqbvx7sNyjR7mIUULFY3FvbhR9msRIXsTYAxYnebE9rxIR9riJbDpxQI2RWhLi6gSU6TqfC8HiQvgCkT3a/JYUAOK9inuzz1i7u/kyLY9f1Lu0jxxWfVW8jBanoKCQamubEy+US4JRLE5v/J/LeDM1hzTCCVWfG/VvDM8q/0lqLSeiSjiaZRPCdOteKQbAZ5Si5wbdTBwuy7J0s2hrX9syZhqCeyrd7Zu2X7C8KyPsoy4JbeeVw/0KU2bZUnPfU1T2c7/6CDUugQy53GPJx0RDUGdlWkIzK5Q5RT++4xxLfCm0huQQ8qkfpfD3Hbb2LdV+HEkR0Cd2ObH6jZW2N80hU3t66S4+bsdrIsFrJxw1CNm7kkGA7c95+wch15HNLMPNiCf186oQu5TSJxeFe3CtFri7Bi0ria2Et3EdwOFMrAbdAKcxiS/YJ0ljjURfG5Ed7boiMzKBoRX0EBy5dU+FKYZoMWrQNcZB7Bu1UfiyQ1pafdjAU8/Y+idUlV4BOMOv4Mj7IyZoQ5cQ+C6ickLFgIrOD01jKl5Twuto+XaxbZ6RewAxoHJah4aPO4QJM9TfAqk3oOB5QJKYcev+AyhYevvNyQaX+HFBqBBh83LWoGPD5dJ1gonOx4a+o90p9QyGnmlH73viyFtBYs6d1atRfPs6hdZRw9ykDjsEnM96S0WE5DdzfwBBplrY1VvCfzQKJNxs3dp9Dwpx0/x09fiFVtjJOjigclli1ImXq6xTY0rkmf/7NciX+ucXPAQo2Z+LFmZ1GqnKOCtUH442EigHn/48RjRqvrwaF1D8iV6EteYAuyGbQUVlst61pQFDoHkSeJBAYVcs9chJPWWcdj3Yc2auOZ0n0P8ydPOcKyCTEy+Eq7tneNTwd/fnBqPrJ3DtL WZqDlVAm 0ROtldKgXRDCHZOvWHZVh7lr6h+rT412ORA7RMjERzOlTzmYjVG0ZY+yogEyep9ND9DS5tketB+x7zwXsC5VvewWakwd9j9jUZluN4GYURhodRVRVNv2NCAc1uRQLyMT2qPGwEfDObIgaDg/c0OJt+t70FY8j/A2poPnnnWGjcb451PqWyWjJQ1An0UMG87qSOmvN 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.