Skip to content

turbostat: Fix AMD output by making turbostat aware of nodes

Prarit Bhargava linux-pm 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 posting 4/48 patches 5 repliesIn review
  2. v2 Latest posting 2/28 patches 0 repliesNew
  3. v2 posting 1/28 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v1 posting 3/47 patches2 repliesSuperseded
v1 posting 2/47 patches0 repliesSuperseded
v1 posting 1/47 patches1 replySuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8turbostat: set max_num_cpus equal to the cpumask lengthtools/power/x86/turbostat/turbostat.c+16 -50 replies
2/8turbostat: Fix node and siblings lookup datatools/power/x86/turbostat/turbostat.c+79 -350 replies
3/8turbostat: Calculate additional node information for a packagetools/power/x86/turbostat/turbostat.c+61 -40 replies
4/8turbostat: track thread ID in cpu_topologytools/power/x86/turbostat/turbostat.c+40 -660 replies
5/8turbostat: rename num_cores_per_pkg to num_cores_per_nodetools/power/x86/turbostat/turbostat.c+14 -120 replies
6/8turbostat: remove num_ from cpu_topology structtools/power/x86/turbostat/turbostat.c+23 -250 replies
7/8turbostat: add node information into turbostat calculationstools/power/x86/turbostat/turbostat.c+85 -580 replies
8/8turbostat: Add Node in outputtools/power/x86/turbostat/turbostat.c+16 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/8 v2 RESEND] turbostat: Fix AMD output by making turbostat aware of nodes

Didn't hear anything for a few weeks after getting comments on v1... resending.

AMD Ryzen, etc., is gaining more traction. I'm seeing more reports of this problem.

P.

---8<---

AMD family processors do not show all cores in the output of turbostat. This occurs because AMD has multiple nodes per socket and enumerates cores within each node from 0. For example, socket 0 may have two nodes (0 and 1) and those nodes both have cores enumerated from 0 through 7. turbostat cannot handle this configuration, and as a result only shows 1/2 the cores in its output.

This patchset makes turbostate aware of nodes. It has been tested on various AMD and Intel systems and no issues have been found.

v2: Fix overwriting of thread_id in 3/8. Add Node output to turbostat (patch
8/8). Various checkpatch.pl cleanups.

Prarit Bhargava (8):
turbostat: set max_num_cpus equal to the cpumask length
turbostat: Fix node and siblings lookup data
turbostat: Calculate additional node information for a package
turbostat: track thread ID in cpu_topology
turbostat: rename num_cores_per_pkg to num_cores_per_node
turbostat: remove num_ from cpu_topology struct
turbostat: add node information into turbostat calculations
turbostat: Add Node in output

 tools/power/x86/turbostat/turbostat.c | 449 ++++++++++++++++++++++------------
 1 file changed, 289 insertions(+), 160 deletions(-)
Signature · 1 line
1.8.5.5