* Re: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist"
2022-10-20 1:51 [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Huang Ying
@ 2022-10-20 3:48 ` Wei Xu
2022-10-20 3:57 ` Aneesh Kumar K.V
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Wei Xu @ 2022-10-20 3:48 UTC (permalink / raw)
To: Huang Ying
Cc: linux-mm, linux-kernel, Andrew Morton, Aneesh Kumar K . V,
Alistair Popple, Bharata B Rao, Dan Williams, Dave Hansen,
Davidlohr Bueso, Hesham Almatary, Jagdish Gediya,
Johannes Weiner, Jonathan Cameron, Michal Hocko, Tim Chen,
Yang Shi
Acked-by: Wei Xu <weixugc@google.com>
On Wed, Oct 19, 2022 at 6:51 PM Huang Ying <ying.huang@intel.com> wrote:
>
> In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and
> "cpulist" or "cpus_list" for cpu list. For example, in my system,
>
> $ cat /sys/devices/system/node/node0/cpumap
> f,ffffffff
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
> 0,00100004
> $ cat cat /sys/devices/system/node/node0/cpulist
> 0-35
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
> 2,20
>
> It looks reasonable to use "nodemap" for node mask and "nodelist" 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..721a05b90109 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/nodelist
> 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.
> + nodelist: NUMA nodes that are part of this memory tier.
>
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index f116b7b6333e..fa8c9d07f9ce 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 nodelist_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(nodelist);
>
> static struct attribute *memtier_dev_attrs[] = {
> - &dev_attr_nodes.attr,
> + &dev_attr_nodelist.attr,
> NULL
> };
>
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist"
2022-10-20 1:51 [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Huang Ying
2022-10-20 3:48 ` Wei Xu
@ 2022-10-20 3:57 ` Aneesh Kumar K.V
2022-10-20 18:47 ` Yang Shi
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Aneesh Kumar K.V @ 2022-10-20 3:57 UTC (permalink / raw)
To: Huang Ying, linux-mm
Cc: linux-kernel, Andrew Morton, Huang Ying, Alistair Popple,
Bharata B Rao, Dan Williams, Dave Hansen, Davidlohr Bueso,
Hesham Almatary, Jagdish Gediya, Johannes Weiner,
Jonathan Cameron, Michal Hocko, Tim Chen, Wei Xu, Yang Shi
Huang Ying <ying.huang@intel.com> writes:
> In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and
> "cpulist" or "cpus_list" for cpu list. For example, in my system,
>
> $ cat /sys/devices/system/node/node0/cpumap
> f,ffffffff
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
> 0,00100004
> $ cat cat /sys/devices/system/node/node0/cpulist
> 0-35
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
> 2,20
>
> It looks reasonable to use "nodemap" for node mask and "nodelist" for
> node list. So, rename the attribute to follow the naming convention.
>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> 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..721a05b90109 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/nodelist
> 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.
> + nodelist: NUMA nodes that are part of this memory tier.
>
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index f116b7b6333e..fa8c9d07f9ce 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 nodelist_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(nodelist);
>
> static struct attribute *memtier_dev_attrs[] = {
> - &dev_attr_nodes.attr,
> + &dev_attr_nodelist.attr,
> NULL
> };
>
> --
> 2.35.1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist"
2022-10-20 1:51 [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Huang Ying
2022-10-20 3:48 ` Wei Xu
2022-10-20 3:57 ` Aneesh Kumar K.V
@ 2022-10-20 18:47 ` Yang Shi
2022-10-21 1:47 ` Andrew Morton
2022-10-24 19:55 ` Davidlohr Bueso
4 siblings, 0 replies; 6+ messages in thread
From: Yang Shi @ 2022-10-20 18:47 UTC (permalink / raw)
To: Huang Ying
Cc: linux-mm, linux-kernel, Andrew Morton, Aneesh Kumar K . V,
Alistair Popple, Bharata B Rao, Dan Williams, Dave Hansen,
Davidlohr Bueso, Hesham Almatary, Jagdish Gediya,
Johannes Weiner, Jonathan Cameron, Michal Hocko, Tim Chen,
Wei Xu
On Wed, Oct 19, 2022 at 6:51 PM Huang Ying <ying.huang@intel.com> wrote:
>
> In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and
> "cpulist" or "cpus_list" for cpu list. For example, in my system,
>
> $ cat /sys/devices/system/node/node0/cpumap
> f,ffffffff
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
> 0,00100004
> $ cat cat /sys/devices/system/node/node0/cpulist
> 0-35
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
> 2,20
>
> It looks reasonable to use "nodemap" for node mask and "nodelist" 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(-)
Reviewed-by: Yang Shi <shy828301@gmail.com>
>
> diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers b/Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers
> index 45985e411f13..721a05b90109 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/nodelist
> 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.
> + nodelist: NUMA nodes that are part of this memory tier.
>
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index f116b7b6333e..fa8c9d07f9ce 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 nodelist_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(nodelist);
>
> static struct attribute *memtier_dev_attrs[] = {
> - &dev_attr_nodes.attr,
> + &dev_attr_nodelist.attr,
> NULL
> };
>
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist"
2022-10-20 1:51 [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Huang Ying
` (2 preceding siblings ...)
2022-10-20 18:47 ` Yang Shi
@ 2022-10-21 1:47 ` Andrew Morton
2022-10-24 19:55 ` Davidlohr Bueso
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2022-10-21 1:47 UTC (permalink / raw)
To: Huang Ying
Cc: linux-mm, linux-kernel, Aneesh Kumar K . V, Alistair Popple,
Bharata B Rao, Dan Williams, Dave Hansen, Davidlohr Bueso,
Hesham Almatary, Jagdish Gediya, Johannes Weiner,
Jonathan Cameron, Michal Hocko, Tim Chen, Wei Xu, Yang Shi
On Thu, 20 Oct 2022 09:51:22 +0800 Huang Ying <ying.huang@intel.com> wrote:
> In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and
> "cpulist" or "cpus_list" for cpu list. For example, in my system,
>
> $ cat /sys/devices/system/node/node0/cpumap
> f,ffffffff
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
> 0,00100004
> $ cat cat /sys/devices/system/node/node0/cpulist
> 0-35
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
> 2,20
>
> It looks reasonable to use "nodemap" for node mask and "nodelist" for
> node list. So, rename the attribute to follow the naming convention.
I'll add
Fixes: 9832fb87834e2b ("mm/demotion: expose memory tier details via sysfs")
to this to reduce the risk that someone will backport 9832fb87834e2b
but will miss this alteration.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist"
2022-10-20 1:51 [PATCH] memory tier, sysfs: rename attribute "nodes" to "nodelist" Huang Ying
` (3 preceding siblings ...)
2022-10-21 1:47 ` Andrew Morton
@ 2022-10-24 19:55 ` Davidlohr Bueso
4 siblings, 0 replies; 6+ messages in thread
From: Davidlohr Bueso @ 2022-10-24 19:55 UTC (permalink / raw)
To: Huang Ying
Cc: linux-mm, linux-kernel, Andrew Morton, Aneesh Kumar K . V,
Alistair Popple, Bharata B Rao, Dan Williams, Dave Hansen,
Hesham Almatary, Jagdish Gediya, Johannes Weiner,
Jonathan Cameron, Michal Hocko, Tim Chen, Wei Xu, Yang Shi
On Thu, 20 Oct 2022, Huang Ying wrote:
>In sysfs, we use attribute name "cpumap" or "cpus" for cpu mask and
>"cpulist" or "cpus_list" for cpu list. For example, in my system,
>
> $ cat /sys/devices/system/node/node0/cpumap
> f,ffffffff
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus
> 0,00100004
> $ cat cat /sys/devices/system/node/node0/cpulist
> 0-35
> $ cat /sys/devices/system/cpu/cpu2/topology/core_cpus_list
> 2,20
>
>It looks reasonable to use "nodemap" for node mask and "nodelist" 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>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
^ permalink raw reply [flat|nested] 6+ messages in thread