]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/power turbostat: Fix --cpu-set 0 regression on HT systems
authorLen Brown <len.brown@intel.com>
Thu, 16 Apr 2026 20:17:31 +0000 (16:17 -0400)
committerLen Brown <len.brown@intel.com>
Wed, 22 Apr 2026 15:31:57 +0000 (11:31 -0400)
commit2c52f942fcf21c8e09c7dac669fca591cec2692b
tree2daf276cea949103fda1b961849c0094a8b56248
parentce012c966b518c53475ba9a4e979242d7322d819
tools/power turbostat: Fix --cpu-set 0 regression on HT systems

"turbostat --cpu-set 0" appears to hang if cpu0 has an HT sibling.

This is because the initialization code recognizes that it does not
have to open perf files for the HT sibling, but the HT support
in the collection code sees the HT sibling and tries to read
from an uninitialized file descriptor, 0 (standard input).

Access HT siblings only when they are in the allowed set.

Fixes: a2b4d0f8bf07 ("tools/power turbostat: Favor cpu# over core#")
Signed-off-by: Len Brown <len.brown@intel.com>
Reported-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
tools/power/x86/turbostat/turbostat.c