Skip to content

Commit 27d676a

Browse files
yhuang-intelakpm00
authored andcommitted
memory tier, sysfs: rename attribute "nodes" to "nodelist"
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. Link: https://lkml.kernel.org/r/[email protected] Fixes: 9832fb8 ("mm/demotion: expose memory tier details via sysfs") Signed-off-by: "Huang, Ying" <[email protected]> Acked-by: Wei Xu <[email protected]> Reviewed-by: Aneesh Kumar K.V <[email protected]> Reviewed-by: Yang Shi <[email protected]> Reviewed-by: Davidlohr Bueso <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Bharata B Rao <[email protected]> Cc: Dan Williams <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Hesham Almatary <[email protected]> Cc: Jagdish Gediya <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Tim Chen <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent b214fad commit 27d676a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Documentation/ABI/testing/sysfs-kernel-mm-memory-tiers

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Description: A collection of all the memory tiers allocated.
1010

1111

1212
What: /sys/devices/virtual/memory_tiering/memory_tierN/
13-
/sys/devices/virtual/memory_tiering/memory_tierN/nodes
13+
/sys/devices/virtual/memory_tiering/memory_tierN/nodelist
1414
Date: August 2022
1515
Contact: Linux memory management mailing list <[email protected]>
1616
Description: Directory with details of a specific memory tier
@@ -21,5 +21,5 @@ Description: Directory with details of a specific memory tier
2121
A smaller value of N implies a higher (faster) memory tier in the
2222
hierarchy.
2323

24-
nodes: NUMA nodes that are part of this memory tier.
24+
nodelist: NUMA nodes that are part of this memory tier.
2525

mm/memory-tiers.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ static void memory_tier_device_release(struct device *dev)
131131
kfree(tier);
132132
}
133133

134-
static ssize_t nodes_show(struct device *dev,
135-
struct device_attribute *attr, char *buf)
134+
static ssize_t nodelist_show(struct device *dev,
135+
struct device_attribute *attr, char *buf)
136136
{
137137
int ret;
138138
nodemask_t nmask;
@@ -143,10 +143,10 @@ static ssize_t nodes_show(struct device *dev,
143143
mutex_unlock(&memory_tier_lock);
144144
return ret;
145145
}
146-
static DEVICE_ATTR_RO(nodes);
146+
static DEVICE_ATTR_RO(nodelist);
147147

148148
static struct attribute *memtier_dev_attrs[] = {
149-
&dev_attr_nodes.attr,
149+
&dev_attr_nodelist.attr,
150150
NULL
151151
};
152152

0 commit comments

Comments
 (0)