Skip to content
Commit b32c3697 authored by Len Brown's avatar Len Brown
Browse files

tools/power turbostat: Fix forked child affinity regression



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: default avatarZhang Rui <rui.zhang@intel.com>
Fixes: 7bb3fe27 ("tools/power/turbostat: Obey allowed CPUs during startup")
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1a202afe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment