From patchwork Fri Jun 10 13:52:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 12877632 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 9DA1DC433EF for ; Fri, 10 Jun 2022 13:55:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DB448D00AF; Fri, 10 Jun 2022 09:55:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28BBF8D009C; Fri, 10 Jun 2022 09:55:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 104C98D00AF; Fri, 10 Jun 2022 09:55:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 002368D009C for ; Fri, 10 Jun 2022 09:55:48 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id D1A91811F3 for ; Fri, 10 Jun 2022 13:55:48 +0000 (UTC) X-FDA: 79562474376.16.E29E880 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf07.hostedemail.com (Postfix) with ESMTP id 74E6540005 for ; Fri, 10 Jun 2022 13:55:48 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25ADoHxW016649; Fri, 10 Jun 2022 13:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=a7bDqNWFTJyacCiGWS/s5MOUukAxREUpgwMRPd1dTmg=; b=gmx3Xm3F/q8k/GeF3AEMUEoM3pq1O0S6TerX3Vr15BOvghnr4Y+wYZIUVzp2vX6mVw5i 6rbAVQRbhoVgtIOo1W7JEzAuLc7VEriDN+SxtYaQu/OVJV9kM6Q+5ZhFMWWw0LP3KCUi J2ghLkvWRClg17GMTraJpfBj77FjhCd2dS1l1X7XeyOCJtUZiKX9z9Xu4MRW6qfGKQZX +V4t4gN7N1c2SSaHpHS+sP9kM/oeLJ+ElKvTstwBJioDjMmEZE61gHBa8TVlJvv2bcXx sK1983zDNb6Pm0Hrv3vohfYQixUIfzJcSMQid9EidUH6eZzMDZMvusXKQcKhwMfcDn4I Cw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gm6q9gkaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:55:36 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25ADqjab026257; Fri, 10 Jun 2022 13:55:35 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gm6q9gk9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:55:35 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25ADZXLr004853; Fri, 10 Jun 2022 13:54:49 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04wdc.us.ibm.com with ESMTP id 3gfy1a922m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jun 2022 13:54:49 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25ADsmFT36438402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jun 2022 13:54:48 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 900806A04D; Fri, 10 Jun 2022 13:54:48 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 975486A051; Fri, 10 Jun 2022 13:54:39 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.90.151]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 10 Jun 2022 13:54:39 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: Wei Xu , Huang Ying , Greg Thelen , Yang Shi , Davidlohr Bueso , Tim C Chen , Brice Goglin , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes , "Aneesh Kumar K.V" Subject: [PATCH v6 13/13] mm/demotion: Add sysfs ABI documentation Date: Fri, 10 Jun 2022 19:22:29 +0530 Message-Id: <20220610135229.182859-14-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610135229.182859-1-aneesh.kumar@linux.ibm.com> References: <20220610135229.182859-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 96LtkCGvMN52ZkQucdAutDgdVy8ShBGH X-Proofpoint-GUID: Togfug4tun8xnidrVKBf_HDl7swp2yS7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-10_06,2022-06-09_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206100056 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654869348; a=rsa-sha256; cv=none; b=3bPx7Y70HaZgzGtjhtb0t5KUPIUNrT8BSD05Bv4mRiGhYswkzfDM/+PyzNjo3molNHMScN gcXFETy78J+7qD6xwu1Sv04L79MH5617Wq9RN5HGihXB9/U/I0TcxwEi8qtSJ/3fKxFLes 387yOm5/eTFUL9+6ECQxzlTYF1t+fuQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=gmx3Xm3F; spf=pass (imf07.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654869348; 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=a7bDqNWFTJyacCiGWS/s5MOUukAxREUpgwMRPd1dTmg=; b=QITSzXBdAvvgFWLKcy8iTFwKWE5RLufhW7pAnBMNPWjqmSQKkPZNji4zm0flXDduzz+QOk BcrJNNCu/beI/8gTLol1aacJiASYSkEnfATbAmjQFno5YB5lBEisyIo4tx2IaOl2P/LRKW cPDg7BDdUl5Ct9bbQWhxC1xYonmw8xY= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 74E6540005 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=gmx3Xm3F; spf=pass (imf07.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Stat-Signature: 6i4zs9nfu4yr4sw3p8pk7cyhyunceycr X-HE-Tag: 1654869348-552653 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 sysfs ABI documentation. Signed-off-by: Wei Xu Signed-off-by: Aneesh Kumar K.V --- .../ABI/testing/sysfs-kernel-mm-memory-tiers | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers new file mode 100644 index 000000000000..b41d2977b0a5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers @@ -0,0 +1,87 @@ +What: /sys/devices/system/memtier/ +Date: June 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + This is the directory containing the information about memory tiers. + + Each memory tier has its own subdirectory. + + The order of memory tiers is determined by their rank values, not by + their memtier device names. A higher rank value means a higher tier. + +What: /sys/devices/system/memtier/default_tier +Date: June 2022 +Contact: Linux memory management mailing list +Description: Default memory tier + + The default memory tier to which memory would get added via hotplug + if the NUMA node is not part of any memory tier + +What: /sys/devices/system/memtier/max_tier +Date: June 2022 +Contact: Linux memory management mailing list +Description: Maximum number of memory tiers supported + + The max memory tier device ID we can create. Users can create memory + tiers in range [0 - max_tier) + +What: /sys/devices/system/memtier/create_tier_from_rank +Date: June 2022 +Contact: Linux memory management mailing list +Description: Interface to create memory tiers from userspace + + Writing to this file with a rank value results in creation of + a new memory tier with the specified rank value. This is used + by userspace to create new memory tiers. + +What: /sys/devices/system/memtier/memtierN/ +Date: June 2022 +Contact: Linux memory management mailing list +Description: Directory with details of a specific memory tier + + This is the directory containing the information about a particular + memory tier, memtierN, where N is the memtier device ID (e.g. 0, 1). + + The memtier device ID number itself is just an identifier and has no + special meaning, i.e. memtier device ID numbers do not determine the + order of memory tiers. + +What: /sys/devices/system/memtier/memtierN/rank +Date: June 2022 +Contact: Linux memory management mailing list +Description: Memory tier rank value + + + When read, list the "rank" value associated with memtierN. + + "Rank" is an opaque value. Its absolute value doesn't have any + special meaning. But the rank values of different memtiers can be + compared with each other to determine the memory tier order. + + For example, if we have 3 memtiers: memtier0, memtier1, memiter2, and + their rank values are 100, 10, 50, then the memory tier order is: + memtier0 -> memtier2 -> memtier1, where memtier0 is the highest tier + and memtier1 is the lowest tier. + + The rank value of each memtier should be unique. + +What: /sys/devices/system/memtier/memtierN/nodelist +Date: June 2022 +Contact: Linux memory management mailing list +Description: Memory tier nodelist + + + When read, list the memory nodes in the specified tier. + +What: /sys/devices/system/node/nodeN/memtier +Date: June 2022 +Contact: Linux memory management mailing list +Description: Memory tier details for node N + + When read, list the device ID of the memory tier that the node belongs + to. Its value is empty for a CPU-only NUMA node. + + When written, the kernel moves the node into the specified memory + tier if the move is allowed. The tier assignments of all other + nodes are not affected.