Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp136147iof; Sun, 5 Jun 2022 23:26:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhsqzVtxbOrI/9IU4zvAcYUGYshHnN2gGoj9qVn1lfJk/PBIOEGlc7aAUHh4Xzakxdss8b X-Received: by 2002:a17:903:1212:b0:15e:7d94:e21d with SMTP id l18-20020a170903121200b0015e7d94e21dmr22767735plh.92.1654496813324; Sun, 05 Jun 2022 23:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654496813; cv=none; d=google.com; s=arc-20160816; b=rRQDdC1oHrzl97ovG/QmyfyOS7JrLSwjKNnaQqzDMHZwx4NFVtMb8vgjlST43hNI45 LMNb6n9JV2L+9VfE/R3yDDoByWHr3rbYQWkIAVWM1vCNVwFa8BoTz+wscf/fbfxvQ5U5 lJgSDOEySEeo1S21qJZg/cXHVLLygwih8ijwBVKEu+2cARI/gbmDgYR12uT3fImVHcEP 2AwzMJd8wYllmPxj2fxCmxzxxxm11BctXZA75g2moYDcVj29E5pozoWgCdiiWc3+gYA8 nb8ENfIInpVAmUMKlNgWhiGxdHwDgZMLftnsvjqh6mTpaeoxk+pFHUvgLThpc/OLxd2D MBZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=AK8VTiHmZxVWgxKU+PEg8p6oOO/RT8TA0ohFC90Evak=; b=Tx8poR7GGsOV7a2vidoe554gcaywNjSIFhYlBjY9PMTSRhvw7SZIULiz5uPqki4QWN 0qvV69Hlw1ugsipcqIjj+0u6HRM7QzDl3tPdb9R0hnHHJ0tRC5/vCak3hRev99fE/33d BYy4oFu5f91C9vWknLjAjNoJ3ZALmFl5wEiFRSk+YBi4cEkOHAV5xrN74kokrdlET+M6 3MSm3n3AWZ7vRmCPx49c/G45yXgftnJnFE1EIfepomX8+AVBilPHZktdYewJmAire0dk HXkHwoDGo4fsQ1Dm3EgEYdE4KVec+l0kjMMBS4wCZQjbZGdGMTJ7dSzJoaZuGuJX1YuU wZ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=hsROOd57; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o19-20020a170903211300b00163724c3d97si16207131ple.564.2022.06.05.23.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:26:53 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=hsROOd57; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C4438FFB0; Sun, 5 Jun 2022 22:30:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbiFFF3d (ORCPT + 99 others); Mon, 6 Jun 2022 01:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbiFFF2m (ORCPT ); Mon, 6 Jun 2022 01:28:42 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9655CBBC for ; Sun, 5 Jun 2022 22:17:07 -0700 (PDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25611ZES023526; Mon, 6 Jun 2022 04:54:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=AK8VTiHmZxVWgxKU+PEg8p6oOO/RT8TA0ohFC90Evak=; b=hsROOd57sQ8HZ3p9Ln6kgn2UM2hoFhqBSyPKyLVZ75B9qrxT4AF1earP2/q1jLz3T/EY 7PLuwF/BOdeY4A6qnA25xL7Fp0xcZ29aS0upUsvufgCk+AQhlLjP0bigQSngah0by9Vr 1drJNWOjbf2C6GU248wI7DLlA6M/v1WB0EhY4+r7J0qLN/ju6R+kSFLcM2YvjkXbdxOL EvAMA/t3qIN3Rw6VNKGWjMSpU8ujYBpTBQIpVgnoaBymzrAqU6D7b14Dgi3o2vYieucu dt21+K0YbsdylPR0dseQwZLoKTRbL51Ndtgi+YeiP21HjV5vW//XOJAFt+YrJy0jZnrY Pg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gg206s6wg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jun 2022 04:54:08 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2564nroK014495; Mon, 6 Jun 2022 04:54:08 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gg206s6w7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jun 2022 04:54:08 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2564oAW5024146; Mon, 6 Jun 2022 04:54:07 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma03wdc.us.ibm.com with ESMTP id 3gfy19b9c6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Jun 2022 04:54:07 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2564s7JM25100606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Jun 2022 04:54:07 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE9BC124058; Mon, 6 Jun 2022 04:54:06 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 650C6124053; Mon, 6 Jun 2022 04:53:59 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.43.87.254]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 6 Jun 2022 04:53:59 +0000 (GMT) X-Mailer: emacs 29.0.50 (via feedmail 11-beta-1 I) 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 Subject: [PATCH] mm/demotion: Add sysfs ABI documentation In-Reply-To: <20220603134237.131362-1-aneesh.kumar@linux.ibm.com> References: <20220603134237.131362-1-aneesh.kumar@linux.ibm.com> Date: Mon, 06 Jun 2022 10:23:56 +0530 Message-ID: <87r1428k9n.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: APa9aTVJURlGYUqnOxoSaN0iZv8cQcAQ X-Proofpoint-GUID: Kgl80yoV0xVh-NuSz9ALzJJ-2uXVBDmi 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-06_01,2022-06-03_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 suspectscore=0 impostorscore=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060023 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From dd986c5aab4f6ccf41cc8d2dde5d9702a17adb6f Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Mon, 6 Jun 2022 10:14:17 +0530 Subject: [PATCH] mm/demotion: Add sysfs ABI documentation Add sysfs ABI documentation. Suggested-by: Wei Xu Signed-off-by: Aneesh Kumar K.V --- .../ABI/testing/sysfs-kernel-mm-memory-tiers | 81 +++++++++++++++++++ 1 file changed, 81 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..41b0d1756ddb --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers @@ -0,0 +1,81 @@ +What: /sys/devices/system/memtier/ +Date: Jun 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: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + 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: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + The max memory tier device ID we can create. Users can create memory + tiers in range [0 - max_tier) + +What: /sys/devices/system/memtier/memtierN/ +Date: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + 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: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + + 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: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + + When read, list the memory nodes in the specified tier. + +What: /sys/devices/system/node/nodeN/memtier +Date: Jun 2022 +Contact: Linux memory management mailing list +Description: Interface for tiered memory + + 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. + + When written with the special string "none" the specific node is removed + from participating in memory demotion. -- 2.36.1