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 A2BB8C433F5 for ; Thu, 12 May 2022 07:03:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9363D6B0074; Thu, 12 May 2022 03:03:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BF086B0075; Thu, 12 May 2022 03:03:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73BB56B0078; Thu, 12 May 2022 03:03:48 -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 63DB06B0074 for ; Thu, 12 May 2022 03:03:48 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 46E036079A for ; Thu, 12 May 2022 07:03:48 +0000 (UTC) X-FDA: 79456200936.05.28FAE8F Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf10.hostedemail.com (Postfix) with ESMTP id AD571C008E for ; Thu, 12 May 2022 07:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652339026; x=1683875026; h=message-id:subject:from:to:date:in-reply-to:references: mime-version:content-transfer-encoding; bh=2BoPkenWCDtGr5uisyAJ+mBH2Rf2kRq/FNVqeUodPQc=; b=gKaGdiXY1xuGVU/n3z/1jGp4l+KEpARvqZmH3CM6SPUos3VKmt3pa3tB 5hzCqo7qnrAu+xc5kqn7m5xrJono427JFYwuoDWjdV8qjZG6TxPecV+Jo XfwFlmt/Al3gelG3rl0/t4ik7Jxg/PzvoRUCN++DvUwPkiXvVc76YiJV4 mdPLpgYWobxW9vXCRqTMZPlrnNKwaCFXE+qDGa1M1h2t3JHoqit2aq9cC 5CnYrxSkRnNoNbxqnCzQbJTtVsoCBxL/f2ukcO6/JS/Dh1+zxuEdPL5C9 EvcrQ45tJvshVtIsvOc0LwkJoeAOEMGHRhcImT7gAn6Pe4syH56F3T2e5 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="251966504" X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="251966504" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 00:03:44 -0700 X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="697915194" Received: from ruonanwa-mobl.ccr.corp.intel.com ([10.254.212.157]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 00:03:39 -0700 Message-ID: <56b41ce6922ed5f640d9bd46a603fa27576532a9.camel@intel.com> Subject: Re: RFC: Memory Tiering Kernel Interfaces (v2) From: "ying.huang@intel.com" To: Wei Xu , Andrew Morton , Greg Thelen , "Aneesh Kumar K.V" , 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 Date: Thu, 12 May 2022 15:03:36 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=gKaGdiXY; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf10.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=ying.huang@intel.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: AD571C008E X-Rspam-User: X-Stat-Signature: o9xrhz3tf9o9r99rek87xqda9cz9sibs X-HE-Tag: 1652339002-471779 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 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 ':' Best Regards, Huang, Ying