linux/tools/power
Len Brown 4eb5f692e9 tools/power turbostat: Fix forked child affinity regression
[ Upstream commit b32c36975d ]

In "one-shot" mode, turbostat
1. takes a counter snapshot
2. forks and waits for a child
3. takes the end counter snapshot and prints the result.

But turbostat counter snapshots currently use affinity to travel
around the system so that counter reads are "local", and this
affinity must be cleared between #1 and #2 above.

The offending commit removed that reset that allowed the child
to run on cpu_present_set.

Fix that issue, and improve upon the original by using
cpu_possible_set for the child.  This allows the child
to also run on CPUs that hotplug online during its runtime.

Reported-by: Zhang Rui <rui.zhang@intel.com>
Fixes: 7bb3fe27ad ("tools/power/turbostat: Obey allowed CPUs during startup")
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-02-08 09:58:10 +01:00
..
acpi ACPI: tools: pfrut: Print the update_cap field during capability query 2024-04-26 19:27:34 +02:00
cpupower cpupower: fix TSC MHz calculation 2025-02-08 09:57:05 +01:00
pm-graph pm-graph: Update directory handling and installation process in Makefile 2024-09-04 14:34:54 +02:00
x86 tools/power turbostat: Fix forked child affinity regression 2025-02-08 09:58:10 +01:00