tools/power/turbostat: Handle offlined CPUs in cpu_subset
authorZhang Rui <rui.zhang@intel.com>
Fri, 20 Oct 2023 06:20:47 +0000 (14:20 +0800)
committerZhang Rui <rui.zhang@intel.com>
Fri, 20 Oct 2023 06:21:27 +0000 (14:21 +0800)
commitc25ef0e5d9d7d5fb9e1679286fc7a11e70f16c70
tree0c691d4856c265ae3821b2061c65667dfb3fc920
parent0fe3752901370b83b63d4ddbce708b23c8e41ea9
tools/power/turbostat: Handle offlined CPUs in cpu_subset

It is possible that the cpu_subset contains offlined CPUs.

If this happens during start, exit immediately because this is likely an
operator error that is best fixed by re-invoking.
If this happens at runtime, give a warning only because turbostat should
do its best effort to continue running.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
tools/power/x86/turbostat/turbostat.c