From mboxrd@z Thu Jan 1 00:00:00 1970 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 8D690C433F5 for ; Thu, 12 May 2022 07:12:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E36768D0001; Thu, 12 May 2022 03:12:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DE6E46B0075; Thu, 12 May 2022 03:12:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C39658D0001; Thu, 12 May 2022 03:12:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id ADEDF6B0074 for ; Thu, 12 May 2022 03:12:33 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 881688026E for ; Thu, 12 May 2022 07:12:33 +0000 (UTC) X-FDA: 79456222986.18.3F212F2 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf24.hostedemail.com (Postfix) with ESMTP id 361971800CC for ; Thu, 12 May 2022 07:12:23 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24C5qPHZ009782; Thu, 12 May 2022 07:12:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=v4fdVTkpD0x7bMIL+g+Nii4Yo6oinbwoadD5PvLQjz0=; b=diB/cNfUw+WRgClkFk/ijSnTTiNN+DVUtej454VcLTKn3donBPD8yMQSwfYtxD3u897r 6qAol7hkmwjXU5/vOZcfLZxzyiborbue5lKTYuPa33qLi3wF2i4sf8sXFDb20D20spst sUB704SazU5ga1X3EoLRIvK2d8lLDGzZVq0Qqw7+STkVk+AKGaGzJ4CC/svVlzvin6Sg aIhhS+145gYAZnmhgURdz+XzRvsY/oZFlXwc2IK21GW53VN2aAp1XOgJyZ3C1xdpGe9l LgOB5XKvZAloP3L5eOpTBt/VxTHIoeHOVbympQY+kAg6B/GP/3kVgiEFomFl6cU59CMb +Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g0vfm1d7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 07:12:17 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24C6sqLs029864; Thu, 12 May 2022 07:12:16 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g0vfm1d6f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 07:12:16 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24C77OB9019503; Thu, 12 May 2022 07:12:12 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03fra.de.ibm.com with ESMTP id 3g0kn78g0d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 May 2022 07:12:12 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24C7CAmQ21299470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 May 2022 07:12:10 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B3BBA405B; Thu, 12 May 2022 07:12:10 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F35CCA4054; Thu, 12 May 2022 07:12:03 +0000 (GMT) Received: from [9.43.96.94] (unknown [9.43.96.94]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 May 2022 07:12:03 +0000 (GMT) Message-ID: Date: Thu, 12 May 2022 12:42:02 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: RFC: Memory Tiering Kernel Interfaces (v2) Content-Language: en-US To: "ying.huang@intel.com" , Wei Xu , Andrew Morton , Greg Thelen , Yang Shi , Linux Kernel Mailing List , Jagdish Gediya , Michal Hocko , Tim C Chen , Dave Hansen , Alistair Popple , Baolin Wang , Feng Tang , Jonathan Cameron , Davidlohr Bueso , Dan Williams , David Rientjes , Linux MM , Brice Goglin , Hesham Almatary References: <56b41ce6922ed5f640d9bd46a603fa27576532a9.camel@intel.com> From: Aneesh Kumar K V In-Reply-To: <56b41ce6922ed5f640d9bd46a603fa27576532a9.camel@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: T2Iz8RIj77DdMScIW3MWDrhAhauHdWa5 X-Proofpoint-ORIG-GUID: v5MXOij59Y8GDI03tvJAKXH726EDQAAh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-11_07,2022-05-12_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205120032 X-Rspamd-Queue-Id: 361971800CC X-Stat-Signature: thbyswm1sadtjx6kbgjumbpw5cmyu1pu Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b="diB/cNfU"; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf24.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1652339543-759408 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: On 5/12/22 12:33 PM, ying.huang@intel.com wrote: > On Wed, 2022-05-11 at 23:22 -0700, Wei Xu wrote: >> Sysfs Interfaces >> ================ >> >> * /sys/devices/system/memtier/memtierN/nodelist >> >>   where N = 0, 1, 2 (the kernel supports only 3 tiers for now). >> >>   Format: node_list >> >>   Read-only. When read, list the memory nodes in the specified tier. >> >>   Tier 0 is the highest tier, while tier 2 is the lowest tier. >> >>   The absolute value of a tier id number has no specific meaning. >>   What matters is the relative order of the tier id numbers. >> >>   When a memory tier has no nodes, the kernel can hide its memtier >>   sysfs files. >> >> * /sys/devices/system/node/nodeN/memtier >> >>   where N = 0, 1, ... >> >>   Format: int or empty >> >>   When read, list 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 assignment of all other nodes >>   are not affected. >> >>   Initially, we can make this interface read-only. > > It seems that "/sys/devices/system/node/nodeN/memtier" has all > information we needed. Do we really need > "/sys/devices/system/memtier/memtierN/nodelist"? > > That can be gotten via a simple shell command line, > > $ grep . /sys/devices/system/node/nodeN/memtier | sort -n -k 2 -t ':' > It will be really useful to fetch the memory tier node list in an easy fashion rather than reading multiple sysfs directories. If we don't have other attributes for memorytier, we could keep "/sys/devices/system/memtier/memtierN" a NUMA node list there by avoiding /sys/devices/system/memtier/memtierN/nodelist -aneesh