[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8c68d2dfd5d516316444b1a25fe550bb42733eb8.1551160674.git.len.brown@intel.com>
Date: Tue, 26 Feb 2019 01:20:11 -0500
From: Len Brown <lenb@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org, Len Brown <len.brown@...el.com>
Subject: [PATCH 13/14] topology: Create core_threads sysfs attribute
From: Len Brown <len.brown@...el.com>
Create CPU topology sysfs attributes:
"core_threads" and "core_threads_list"
These attributes represent all of the logical CPU threads that share the
same core.
These attriutes is synonymous with the existing "thread_siblings" and
"thread_siblings_list" attribute, which will be deprecated.
Signed-off-by: Len Brown <len.brown@...el.com>
Suggested-by: Brice Goglin <Brice.Goglin@...ia.fr>
---
Documentation/cputopology.txt | 8 ++++----
drivers/base/topology.c | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index 2794dbe8e559..e67915a8a512 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -36,15 +36,15 @@ drawer_id:
identifier (rather than the kernel's). The actual value is
architecture and platform dependent.
-thread_siblings:
+core_threads:
internal kernel map of cpuX's hardware threads within the same
- core as cpuX.
+ core as cpuX. (deprecated name: "thread_siblings")
-thread_siblings_list:
+core_threads_list:
human-readable list of cpuX's hardware threads within the same
- core as cpuX.
+ core as cpuX. (deprecated name: "thread_siblings_list");
package_threads:
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index 5f4405a08c6e..73efadf5e6d4 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -53,6 +53,10 @@ define_siblings_show_func(thread_siblings, sibling_cpumask);
static DEVICE_ATTR_RO(thread_siblings);
static DEVICE_ATTR_RO(thread_siblings_list);
+define_siblings_show_func(core_threads, sibling_cpumask);
+static DEVICE_ATTR_RO(core_threads);
+static DEVICE_ATTR_RO(core_threads_list);
+
define_siblings_show_func(core_siblings, core_cpumask);
static DEVICE_ATTR_RO(core_siblings);
static DEVICE_ATTR_RO(core_siblings_list);
@@ -83,6 +87,8 @@ static struct attribute *default_attrs[] = {
&dev_attr_core_id.attr,
&dev_attr_thread_siblings.attr,
&dev_attr_thread_siblings_list.attr,
+ &dev_attr_core_threads.attr,
+ &dev_attr_core_threads_list.attr,
&dev_attr_core_siblings.attr,
&dev_attr_core_siblings_list.attr,
&dev_attr_package_threads.attr,
--
2.18.0-rc0
Powered by blists - more mailing lists