Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1252991 > unrolled thread
| Started by | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| First post | 2015-10-21 18:10 +0200 |
| Last post | 2015-10-21 18:10 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/2] Add CONFIG_PERMANENT_CPU_TOPOLOGY [v2] Prarit Bhargava <prarit@redhat.com> - 2015-10-21 18:10 +0200
[PATCH 2/2] base, cpu, remove hotplugable_cpu_attr_groups Prarit Bhargava <prarit@redhat.com> - 2015-10-21 18:10 +0200
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Date | 2015-10-21 18:10 +0200 |
| Subject | [PATCH 0/2] Add CONFIG_PERMANENT_CPU_TOPOLOGY [v2] |
| Message-ID | <qm47E-82T-9@gated-at.bofh.it> |
The information in /sys/devices/system/cpu/cpuX/topology
directory is useful for userspace monitoring applications and in-tree
utilities like cpupower & turbostat.
When down'ing a CPU the /sys/devices/system/cpu/cpuX/topology directory is
removed during the CPU_DEAD hotplug callback in the kernel. The problem
with this model is that the CPU has not been physically removed and the
data in the topology directory is still valid.
This patchset adds CONFIG_PERMANENT_CPU_TOPOLOGY, and is Y by default for
x86, an N for all other arches. When enabled the kernel is modified so
that the topology directory is added to the core cpu sysfs files so that
the topology directory exists for the lifetime of the CPU. When
disabled, the behavior of the current kernel is maintained (that is, the
topology directory is removed on a down and added on an up). Adding
CONFIG_PERMANENT_CPU_TOPOLOGY may require additional architecture so that
the cpumask data the CPU's topology is not cleared during a CPU down.
This patchset combines drivers/base/topology.c and drivers/base/cpu.c to
implement CONFIG_PERMANENT_CPU_TOPOLOGY, and leaves all arches except
x86 with the current behavior, and adds an additional minor cleanup to
drivers/base/cpu.c.
[v2]: core_siblings, and thread_siblings are "numa siblings that are online"
and "thread siblings that are online" and are used as such within the kernel.
They must be zero'd out when the CPU is offline.
Prarit Bhargava (2):
cpu hotplug, add CONFIG_PERMANENT_CPU_TOPOLOGY and keep topology
directory for lifetime of CPU [v2]
base, cpu, remove hotplugable_cpu_attr_groups
arch/x86/kernel/smpboot.c | 3 -
drivers/base/Kconfig | 13 ++++
drivers/base/Makefile | 2 +-
drivers/base/cpu.c | 141 ++++++++++++++++++++++++++++++++++++++---
drivers/base/topology.c | 155 ---------------------------------------------
5 files changed, 146 insertions(+), 168 deletions(-)
delete mode 100644 drivers/base/topology.c
--
1.7.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Date | 2015-10-21 18:10 +0200 |
| Subject | [PATCH 2/2] base, cpu, remove hotplugable_cpu_attr_groups |
| Message-ID | <qm47G-82T-41@gated-at.bofh.it> |
| In reply to | #1252991 |
hotplugable_cpu_attr_groups is not different from common_cpu_attr_groups,
and can be removed. This patchset renames common_cpu_attr_groups to
cpu_attr_groups.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Thomas Renninger <trenn@suse.de>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
drivers/base/cpu.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 9c30782..8520c68 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -309,17 +309,7 @@ out:
device_initcall(topology_sysfs_init);
#endif
-static const struct attribute_group *common_cpu_attr_groups[] = {
-#ifdef CONFIG_KEXEC
- &crash_note_cpu_attr_group,
-#endif
-#ifdef CONFIG_PERMANENT_CPU_TOPOLOGY
- &topology_attr_group,
-#endif
- NULL
-};
-
-static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
+static const struct attribute_group *cpu_attr_groups[] = {
#ifdef CONFIG_KEXEC
&crash_note_cpu_attr_group,
#endif
@@ -502,9 +492,7 @@ int register_cpu(struct cpu *cpu, int num)
#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
cpu->dev.bus->uevent = cpu_uevent;
#endif
- cpu->dev.groups = common_cpu_attr_groups;
- if (cpu->hotpluggable)
- cpu->dev.groups = hotplugable_cpu_attr_groups;
+ cpu->dev.groups = cpu_attr_groups;
error = device_register(&cpu->dev);
if (!error)
per_cpu(cpu_sys_devices, num) = &cpu->dev;
--
1.7.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web