tools/power turbostat: Fix logical node enumeration to allow for non-sequential physi...
authorPrarit Bhargava <prarit@redhat.com>
Thu, 26 Jul 2018 13:08:54 +0000 (09:08 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 26 Jul 2018 18:20:59 +0000 (14:20 -0400)
commit2ffbb22406079fec2c3a6ad6ee1dc99fede740ac
tree02ee8ea8b1fcaff212175dfdaf87fd81490a801a
parentcfce494db3bfccd2a0774652b95f286639acef36
tools/power turbostat: Fix logical node enumeration to allow for non-sequential physical nodes

turbostat fails on some multi-package topologies because the logical node
enumeration assumes that the nodes are sequentially numbered,
which causes the logical numa nodes to not be enumerated, or enumerated incorrectly.

Use a more robust enumeration algorithm which allows for non-seqential physical nodes.

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