]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/power turbostat: Eliminate unnecessary data structure allocation
authorZhang Rui <rui.zhang@intel.com>
Tue, 10 Mar 2026 06:02:01 +0000 (14:02 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 18 Mar 2026 03:13:09 +0000 (23:13 -0400)
commit99b38fa34342b227a863948460b7937a97dbce28
tree9071c637ca7c91b5042158ade66c0e9e334f6bf2
parentb8ead30e2b2c7f32c8d2782e805160b110766592
tools/power turbostat: Eliminate unnecessary data structure allocation

Linux core_id's are a per-package namespace, not a per-node namespace.

Rename topo.cores_per_node to topo.cores_per_pkg to reflect this.

Eliminate topo.nodes_per_pkg from the sizing for core data structures,
since it has no role except to unnecessarily bloat the allocation.

Validated on multiple Intel platforms (ICX/SPR/SRF/EMR/GNR/CWF) with
various CPU online/offline configurations and SMT enabled/disabled
scenarios.

No functional changes.

[lenb: commit message]
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c