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 BF957ECAAA3 for ; Fri, 26 Aug 2022 04:31:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12F246B0074; Fri, 26 Aug 2022 00:31:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DFA8940007; Fri, 26 Aug 2022 00:31:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE88B6B0078; Fri, 26 Aug 2022 00:31:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DB1446B0074 for ; Fri, 26 Aug 2022 00:31:26 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A19ACAAAC8 for ; Fri, 26 Aug 2022 04:31:26 +0000 (UTC) X-FDA: 79840469772.12.BCAE58A Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf16.hostedemail.com (Postfix) with ESMTP id 6865D18000A for ; Fri, 26 Aug 2022 04:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661488285; x=1693024285; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=xh7fXVrVZZ8TR/92mtZODU9ZNKLc8hVgtACRH5wtXEc=; b=cAHm8337UA8btxULOk3EM5bZJcbGFHEwy8UieK2+lKeH/tURQWxOkJx4 DtxNQu87CBMcOrb7oh+sPdx5dhRDQ7u0GE6Bb2JJLmIUueAy0Aon9bwD4 CbVCUHL8yocPGV5VDKa1Hdq8Op6wBKZpGAzb0MrVphFty+NLhRIqvCJPu hvZOlPy+MtrVveChkkc9xgY5IGCSR1dKpBL01EzHrJK3abtLpxhm7tvPp geaG9VyHWDg8rrunjEN5vp6bcHjgVRnbNKJlEDHBK3JMt40N+vk6oTb9n bmNAU35Np+fuA+z4S3+9feSHu0uK47qwjSYWCBw73n8OJHRY/SmZCQ1uz w==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="320513853" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="320513853" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 21:31:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="699717298" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 21:31:20 -0700 From: "Huang, Ying" To: "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Johannes Weiner , jvgediya.oss@gmail.com, Bharata B Rao Subject: Re: [RFC PATCH 2/2] mm/demotion: Expose memory tier details via sysfs In-Reply-To: <20220825092325.381517-2-aneesh.kumar@linux.ibm.com> (Aneesh Kumar K. V.'s message of "Thu, 25 Aug 2022 14:53:25 +0530") References: <20220825092325.381517-1-aneesh.kumar@linux.ibm.com> <20220825092325.381517-2-aneesh.kumar@linux.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Fri, 26 Aug 2022 12:31:10 +0800 Message-ID: <871qt339td.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661488286; 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=9DwyQYG2awmTX2lrkrsKc0a6O5N39YAGeGQocTkGWYs=; b=ZPpoVSSnTO2kUAevKo53wi1ee7kGAQoxEQhEP8JbVVYwsPsq8PopWbQRh5bs3VgOZVdVuF MWBEtGDrxtg/dck0hrtpAtqh0rqgF4pZu5EFv9gCIz47gzahbL6P/XhT087XNHQKmtTX88 YtNOnRcdZLxm0Zhk1u1tweqICC8/q9g= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=cAHm8337; spf=pass (imf16.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661488286; a=rsa-sha256; cv=none; b=MqWoIyAECLpO3XxOkClPuMtIv+Kbd1M7tTc4nTRSLEeUIqJT5UsdQzp7iVyvTuL56vhL6C X4GMovXhDIUp/FX8x+wXeFdcIBbBoTwTtvCKFQlskjjFb7Pkz+FMhpwNRGOiyeRfzm2p/I iz1sBpNGf++/t6em6khXJkSu+Tc2dfA= Authentication-Results: imf16.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=cAHm8337; spf=pass (imf16.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Stat-Signature: 8krx7ry3ewzj3hrqbysefgunnwa9s8jy X-Rspamd-Queue-Id: 6865D18000A X-Rspamd-Server: rspam03 X-HE-Tag: 1661488285-677722 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: "Aneesh Kumar K.V" writes: > All allocated memory tiers will be listed as > /sys/devices/virtual/memtier/memtierN/ > > Each memtier directory contains symbolic link for the memory types > that are part of the memory tier. A directory hierarchy looks like > > :/sys/devices/virtual/memtier# tree memtier512/ > memtier512/ So you suggest to use abstract_distance_start as memory tier ID? That will make memory tier ID stable unless we change abstract distance chunk size or abstract distance division points. That is, we have at least 2 choices here 1. memory_tier0, memory_tier1, memory_tier2, ... The ID will start from 0. This is easy to understand by users. The main drawback is that the memory tier ID may be changed when a NUMA node is onlined/offlined. That is, the memory tier ID is relatively unstable. 2. memory_tier, memory_tier, ... The ID will be discontinuous. So it's not as intuitive as 0,1,2,.... The main advantage is that the memory tier ID will not change when a NUMA node is onlined/offlined. The ID will be changed only when we change abstract distance chunk size or abstract distance division points. That is considered relatively seldom. Personally, I prefer the 2nd choice too. But I want to collect opinions from other people too. > =E2=94=9C=E2=94=80=E2=94=80 memtype1 -> ../memtype1 > =E2=94=9C=E2=94=80=E2=94=80 memtype2 -> ../memtype2 I think abstract_distance_start and abstract_distance_end is the key information of a memory tier too. So we should show them here. > =E2=94=9C=E2=94=80=E2=94=80 subsystem -> ../../../../bus/memtier > =E2=94=94=E2=94=80=E2=94=80 uevent > > The nodes which are part of a specific memory type can be listed via > /sys/devices/system/memtier/memtypeN/nodes. > > The adistance value of a specific memory type can be listed via > /sys/devices/system/memtier/memtypeN/adistance. > > Signed-off-by: Aneesh Kumar K.V Best Regards, Huang, Ying [snip]