diff options
author | Len Brown <len.brown@intel.com> | 2019-02-16 08:58:23 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2019-03-21 05:55:37 +0300 |
commit | df2f677dee3ce4afda7ee561dd4f321c40320afd (patch) | |
tree | 3291447eefb6095fb13c314a01c9311219e6d658 /tools/power | |
parent | 1c163f4c7b3f621efff9b28a47abb36f7378d783 (diff) | |
download | linux-df2f677dee3ce4afda7ee561dd4f321c40320afd.tar.xz |
tools/power turbostat: Restore ability to execute in topology-order
turbostat executes on CPUs in "topology order".
This is an optimization for measuring profoundly idle systems --
as the closest hardware is woken next...
Fix a typo that was added with the sub-die-node support,
that broke topology ordering on multi-node systems.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 9327c0ddc3a5..78d88b7d4e98 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -314,9 +314,8 @@ int for_all_cpus(int (func)(struct thread_data *, struct core_data *, struct pkg int retval, pkg_no, core_no, thread_no, node_no; for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) { - for (core_no = 0; core_no < topo.cores_per_node; ++core_no) { - for (node_no = 0; node_no < topo.nodes_per_pkg; - node_no++) { + for (node_no = 0; node_no < topo.nodes_per_pkg; node_no++) { + for (core_no = 0; core_no < topo.cores_per_node; ++core_no) { for (thread_no = 0; thread_no < topo.threads_per_core; ++thread_no) { struct thread_data *t; |