linux/tools/power/x86
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
..
amd_pstate_tracer selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut 2023-10-16 13:06:50 -06:00
intel-speed-select tools/power/x86/intel-speed-select: v1.20 release 2024-07-07 00:38:57 -07:00
intel_pstate_tracer tools/power/x86/intel_pstate_tracer: python minimum version 2023-09-21 20:35:50 +02:00
turbostat tools/power turbostat: Fix forked child affinity regression 2025-02-08 09:58:10 +01:00
x86_energy_perf_policy tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num() 2024-02-22 20:05:28 +01:00