]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: harden against cpu hotplug
authorLen Brown <len.brown@intel.com>
Thu, 1 Oct 2020 00:58:15 +0000 (20:58 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 23 Oct 2020 20:54:05 +0000 (16:54 -0400)
commit74348e005408f2697dd7f76a83e145855eb17547
tree1f51c47ba019658cad7401d8037490a5a0c6d3a5
parentbd5a52b37cc516cbaff9c94ac731a22e368389c1
tools/power turbostat: harden against cpu hotplug

turbostat tends to get confused when CPUs are added and removed
while it is running.

There are races, such as checking the current cpu, and then
reading a sysfs file that depends on that cpu number.

Close the two issues that seem to come up the most.
First, there is an infinite reset loop detector --
change that to allow more resets before giving up.
Secondly, one of those file reads didn't really need
to exit the program on failure...

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c