]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: Fix node and siblings lookup data
authorLen Brown <len.brown@intel.com>
Sat, 2 Jun 2018 02:08:58 +0000 (22:08 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 2 Jun 2018 03:12:46 +0000 (23:12 -0400)
commit22ef390333a7c8b4698359fabe46dfbd7c48feaa
treeb9d5f470776eaa311e544882a8a83d6edc829f3d
parentb72973c98ed3af72439c6d3f8da44dc783a57dc9
tools/power turbostat: Fix node and siblings lookup data

The turbostat code only looks at thread_siblings_list to determine if
processing units/threads are on the same the core.  This works well on
Intel systems which have a shared L1 instruction and data cache.  This
does not work on AMD systems which have shared L1 instruction cache but
separate L1 data caches.  Other utilities also check sibling's core ID
to determine if the processing unit shares the same core.

Additionally, the cpu_topology *cpus list used in topology_probe() can
be used elsewhere in the code to simplify things.

Export *cpus to the entire turbostat code, and add Processing Unit/Thread
IDs information to each cpu_topology struct.  Confirm that the thread
is on the same core as indicated by thread_siblings_list.

[v2]: Fixup CPU_* usage that caused gcc malloc error.

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