Message ID | 20221018052541.265708-1-ying.huang@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1788051wrs; Mon, 17 Oct 2022 22:37:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5iv9ubdkg+Fw/HFPo4LFFRLNadOQKwZuZ2U8Ii5/NSAycIe0BGgqYV4Ji971aoVHid+uEH X-Received: by 2002:a63:4283:0:b0:457:dced:8ba3 with SMTP id p125-20020a634283000000b00457dced8ba3mr1277810pga.220.1666071432516; Mon, 17 Oct 2022 22:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666071432; cv=none; d=google.com; s=arc-20160816; b=Zpm7DkTuyLDlG1iXS7xuWJdxvUrcgAlgcLuVGJCKBV2RjF8fy1l9tTCmHMqmW3vkgc J2D5reD52l8cSGSCAG3UMfYnqjFI/zSfrHzCm8Z8BPkDbHoa+JNcsihlZvB7bNu2rdeE f3oy3l6l5v7YrJJlKTtsyxH5Zm5FLZetLcvz4wvDa9NQc8a5JaLJm34TcZf9d4Va3FAy 5sFC8Z2UkuJd3xeaHgb/CaNV4gwwEYNFlwZ11J7JvWCQqo5FzBZIBUbAOCpdUXMmAKDc JTFloYLnlHz3Pb2Rj+hLZrQ7qmEmSVm8po9Idq546im/15LI8+aS8NJnCdJCsIyD8sM0 tRjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MykepC8e0CoYFO0YhxpRp3FskY3Xb+H6od8UvkytrNE=; b=fDL/h0Nr5tccaXYV7glTlHSA8eVdqnhG1nHqH8b8O9Hk5nUWdlN9Fwf9X0HYeeX8i7 Yj5axse7jHL1fNq6rxBsKwlG8zzoSOYic5zAvBr4FBjkC7mhK/aFs6BBPY4oYWEUgEse MrKKPFrNNA2FxoFTa9zrDB5MkGkxMXKUt/jdybhP+B79W7XPwhnHPnJV2edGlxEUfEcL zSvTIK0p0aFM1zDM7iaLcgteYrneYYjTwuRmfqQ/6eVIPIHZpDa/Q6hpWRIwFdCCfw3G +e+U5LL4f2/2MqCoGOEcRBHqw3u++AarcL9u4wCa1y7DKvpmzgEnDpCH1wBHpMXugdfm TR6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Akk6ViUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a6541cc000000b00464a9874658si14957076pgq.6.2022.10.17.22.36.59; Mon, 17 Oct 2022 22:37:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Akk6ViUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229874AbiJRF0K (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 01:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbiJRF0J (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 01:26:09 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C2272846 for <linux-kernel@vger.kernel.org>; Mon, 17 Oct 2022 22:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666070768; x=1697606768; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=y2RqQYPqokfPxKDpaiZB+BcZNoeDLOFn+N6zZNXnkDQ=; b=Akk6ViUi01foHqe4SVTfDAlb0VsXTr6cU2db0zoZg6znX1h3SYAzrNQd SmoFhqbZMVM+yIseyvgHu4vOTZBFoEVFY9PnOVUi6BestehdQBQDcmPBK Bom+TvtFtwwqUQngpSNncPH1Ck38R8ca704v0Ws7EEyhFZ+4Q/MBAC0zV oW4sFOcr4/Xhzb2ukCkpe9DyF0wMV8z65ZMQ49gAt2daOj3PVwN3/tiQk Hm5rAgoAhh+BDFcUYLTskworCFp7s0cHP7bo+GsXWGdvc9dX3XP6DUGnX VYAmFjPFFqAVxkLtFMJ643zOqu94YenDvPcNnX2em+z3dQKz0o9wSi84j g==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="392303383" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="392303383" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 22:26:08 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="771043863" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="771043863" Received: from yhuang6-mobl2.sh.intel.com ([10.238.6.69]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 22:26:02 -0700 From: Huang Ying <ying.huang@intel.com> To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Huang Ying <ying.huang@intel.com>, "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>, Alistair Popple <apopple@nvidia.com>, Bharata B Rao <bharata@amd.com>, Dan Williams <dan.j.williams@intel.com>, Dave Hansen <dave.hansen@intel.com>, Davidlohr Bueso <dave@stgolabs.net>, Hesham Almatary <hesham.almatary@huawei.com>, Jagdish Gediya <jvgediya.oss@gmail.com>, Johannes Weiner <hannes@cmpxchg.org>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, Michal Hocko <mhocko@kernel.org>, Tim Chen <tim.c.chen@intel.com>, Wei Xu <weixugc@google.com>, Yang Shi <shy828301@gmail.com> Subject: [RFC] memory tier, sysfs: rename attribute "nodes" to "nodes_list" Date: Tue, 18 Oct 2022 13:25:41 +0800 Message-Id: <20221018052541.265708-1-ying.huang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747002518083155753?= X-GMAIL-MSGID: =?utf-8?q?1747002518083155753?= |
Series |
[RFC] memory tier, sysfs: rename attribute "nodes" to "nodes_list"
|
|
Commit Message
Huang, Ying
Oct. 18, 2022, 5:25 a.m. UTC
In sysfs, we use attribute name "cpus" for cpu mask and "cpus_list"
for cpu list. For example, in my system,
$ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
0,00100004
$ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
2,20
It looks reasonable to use "nodes" for node mask and "nodes_list" for
node list. So, rename the attribute to follow the naming convention.
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Bharata B Rao <bharata@amd.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Hesham Almatary <hesham.almatary@huawei.com>
Cc: Jagdish Gediya <jvgediya.oss@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Tim Chen <tim.c.chen@intel.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Yang Shi <shy828301@gmail.com>
---
Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers | 4 ++--
mm/memory-tiers.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
Comments
How about "nodelist", instead of "nodes_list"? It is more concise and follows the convention of: /sys/devices/system/nodes/node0/cpulist Wei On Mon, Oct 17, 2022 at 10:26 PM Huang Ying <ying.huang@intel.com> wrote: > > In sysfs, we use attribute name "cpus" for cpu mask and "cpus_list" > for cpu list. For example, in my system, > > $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus > 0,00100004 > $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list > 2,20 > > It looks reasonable to use "nodes" for node mask and "nodes_list" for > node list. So, rename the attribute to follow the naming convention. > > Signed-off-by: "Huang, Ying" <ying.huang@intel.com> > Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> > Cc: Alistair Popple <apopple@nvidia.com> > Cc: Bharata B Rao <bharata@amd.com> > Cc: Dan Williams <dan.j.williams@intel.com> > Cc: Dave Hansen <dave.hansen@intel.com> > Cc: Davidlohr Bueso <dave@stgolabs.net> > Cc: Hesham Almatary <hesham.almatary@huawei.com> > Cc: Jagdish Gediya <jvgediya.oss@gmail.com> > Cc: Johannes Weiner <hannes@cmpxchg.org> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Michal Hocko <mhocko@kernel.org> > Cc: Tim Chen <tim.c.chen@intel.com> > Cc: Wei Xu <weixugc@google.com> > Cc: Yang Shi <shy828301@gmail.com> > --- > Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers | 4 ++-- > mm/memory-tiers.c | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers > index 45985e411f13..af07e166f559 100644 > --- a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers > +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers > @@ -10,7 +10,7 @@ Description: A collection of all the memory tiers allocated. > > > What: /sys/devices/virtual/memory_tiering/memory_tierN/ > - /sys/devices/virtual/memory_tiering/memory_tierN/nodes > + /sys/devices/virtual/memory_tiering/memory_tierN/nodes_list > Date: August 2022 > Contact: Linux memory management mailing list <linux-mm@kvack.org> > Description: Directory with details of a specific memory tier > @@ -21,5 +21,5 @@ Description: Directory with details of a specific memory tier > A smaller value of N implies a higher (faster) memory tier in the > hierarchy. > > - nodes: NUMA nodes that are part of this memory tier. > + nodes_list: NUMA nodes that are part of this memory tier. > > diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c > index f116b7b6333e..8dbfe9ec87d5 100644 > --- a/mm/memory-tiers.c > +++ b/mm/memory-tiers.c > @@ -131,8 +131,8 @@ static void memory_tier_device_release(struct device *dev) > kfree(tier); > } > > -static ssize_t nodes_show(struct device *dev, > - struct device_attribute *attr, char *buf) > +static ssize_t nodes_list_show(struct device *dev, > + struct device_attribute *attr, char *buf) > { > int ret; > nodemask_t nmask; > @@ -143,10 +143,10 @@ static ssize_t nodes_show(struct device *dev, > mutex_unlock(&memory_tier_lock); > return ret; > } > -static DEVICE_ATTR_RO(nodes); > +static DEVICE_ATTR_RO(nodes_list); > > static struct attribute *memtier_dev_attrs[] = { > - &dev_attr_nodes.attr, > + &dev_attr_nodes_list.attr, > NULL > }; > > -- > 2.35.1 >
Wei Xu <weixugc@google.com> writes: > How about "nodelist", instead of "nodes_list"? It is more concise and > follows the convention of: > > /sys/devices/system/nodes/node0/cpulist Sounds good to me. It seems that cpumap/cpulist is another pair of mask/list. /sys/devices/system/node/node0/cpumap /sys/devices/system/node/node0/cpulist /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_list Best Regards, Huang, Ying > On Mon, Oct 17, 2022 at 10:26 PM Huang Ying <ying.huang@intel.com> wrote: >> >> In sysfs, we use attribute name "cpus" for cpu mask and "cpus_list" >> for cpu list. For example, in my system, >> >> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus >> 0,00100004 >> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list >> 2,20 >> >> It looks reasonable to use "nodes" for node mask and "nodes_list" for >> node list. So, rename the attribute to follow the naming convention. >> >> Signed-off-by: "Huang, Ying" <ying.huang@intel.com> >> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> >> Cc: Alistair Popple <apopple@nvidia.com> >> Cc: Bharata B Rao <bharata@amd.com> >> Cc: Dan Williams <dan.j.williams@intel.com> >> Cc: Dave Hansen <dave.hansen@intel.com> >> Cc: Davidlohr Bueso <dave@stgolabs.net> >> Cc: Hesham Almatary <hesham.almatary@huawei.com> >> Cc: Jagdish Gediya <jvgediya.oss@gmail.com> >> Cc: Johannes Weiner <hannes@cmpxchg.org> >> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> >> Cc: Michal Hocko <mhocko@kernel.org> >> Cc: Tim Chen <tim.c.chen@intel.com> >> Cc: Wei Xu <weixugc@google.com> >> Cc: Yang Shi <shy828301@gmail.com> >> --- >> Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers | 4 ++-- >> mm/memory-tiers.c | 8 ++++---- >> 2 files changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers >> index 45985e411f13..af07e166f559 100644 >> --- a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers >> +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers >> @@ -10,7 +10,7 @@ Description: A collection of all the memory tiers allocated. >> >> >> What: /sys/devices/virtual/memory_tiering/memory_tierN/ >> - /sys/devices/virtual/memory_tiering/memory_tierN/nodes >> + /sys/devices/virtual/memory_tiering/memory_tierN/nodes_list >> Date: August 2022 >> Contact: Linux memory management mailing list <linux-mm@kvack.org> >> Description: Directory with details of a specific memory tier >> @@ -21,5 +21,5 @@ Description: Directory with details of a specific memory tier >> A smaller value of N implies a higher (faster) memory tier in the >> hierarchy. >> >> - nodes: NUMA nodes that are part of this memory tier. >> + nodes_list: NUMA nodes that are part of this memory tier. >> >> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c >> index f116b7b6333e..8dbfe9ec87d5 100644 >> --- a/mm/memory-tiers.c >> +++ b/mm/memory-tiers.c >> @@ -131,8 +131,8 @@ static void memory_tier_device_release(struct device *dev) >> kfree(tier); >> } >> >> -static ssize_t nodes_show(struct device *dev, >> - struct device_attribute *attr, char *buf) >> +static ssize_t nodes_list_show(struct device *dev, >> + struct device_attribute *attr, char *buf) >> { >> int ret; >> nodemask_t nmask; >> @@ -143,10 +143,10 @@ static ssize_t nodes_show(struct device *dev, >> mutex_unlock(&memory_tier_lock); >> return ret; >> } >> -static DEVICE_ATTR_RO(nodes); >> +static DEVICE_ATTR_RO(nodes_list); >> >> static struct attribute *memtier_dev_attrs[] = { >> - &dev_attr_nodes.attr, >> + &dev_attr_nodes_list.attr, >> NULL >> }; >> >> -- >> 2.35.1 >>
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers index 45985e411f13..af07e166f559 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers +++ b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers @@ -10,7 +10,7 @@ Description: A collection of all the memory tiers allocated. What: /sys/devices/virtual/memory_tiering/memory_tierN/ - /sys/devices/virtual/memory_tiering/memory_tierN/nodes + /sys/devices/virtual/memory_tiering/memory_tierN/nodes_list Date: August 2022 Contact: Linux memory management mailing list <linux-mm@kvack.org> Description: Directory with details of a specific memory tier @@ -21,5 +21,5 @@ Description: Directory with details of a specific memory tier A smaller value of N implies a higher (faster) memory tier in the hierarchy. - nodes: NUMA nodes that are part of this memory tier. + nodes_list: NUMA nodes that are part of this memory tier. diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index f116b7b6333e..8dbfe9ec87d5 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -131,8 +131,8 @@ static void memory_tier_device_release(struct device *dev) kfree(tier); } -static ssize_t nodes_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t nodes_list_show(struct device *dev, + struct device_attribute *attr, char *buf) { int ret; nodemask_t nmask; @@ -143,10 +143,10 @@ static ssize_t nodes_show(struct device *dev, mutex_unlock(&memory_tier_lock); return ret; } -static DEVICE_ATTR_RO(nodes); +static DEVICE_ATTR_RO(nodes_list); static struct attribute *memtier_dev_attrs[] = { - &dev_attr_nodes.attr, + &dev_attr_nodes_list.attr, NULL };