Support HBM and CXL PMON uncore counters
Status from this message: The following commit has been merged into the perf/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 2 repliesApplied
- v18 patches 5 repliesSuperseded
Changes since V2 from the cover letter
- Update the description of patch 1 to explain the design of the new RB tree. (Tim)
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | perf/x86/uncore: Save the unit control address of all unitsarch/ arch/ | +87 | 2 replies | |
| 2/8 | perf/x86/uncore: Support per PMU cpumaskarch/ arch/ arch/ +1 more | +89 | 0 replies | |
| 3/8 | perf/x86/uncore: Retrieve the unit ID from the unit control RB treearch/ | +3 | 0 replies | |
| 4/8 | perf/x86/uncore: Apply the unit control RB tree to MMIO uncore unitsarch/ | +14 | 0 replies | |
| 5/8 | perf/x86/uncore: Apply the unit control RB tree to MSR uncore unitsarch/ arch/ arch/ +1 more | +59 | 0 replies | |
| 6/8 | perf/x86/uncore: Apply the unit control RB tree to PCI uncore unitsarch/ arch/ arch/ +2 more | +94 | 0 replies | |
| 7/8 | perf/x86/uncore: Cleanup unused unit structurearch/ arch/ arch/ +1 more | +12 | 0 replies | |
| 8/8 | perf/x86/intel/uncore: Support HBM and CXL PMON countersarch/ | +53 | 0 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by.
| Patch | Yunying Sun |
|---|---|
| 1/8 | |
| 2/8 | T-b |
| 3/8 | T-b |
| 4/8 | T-b |
| 5/8 | T-b |
| 6/8 | T-b |
| 7/8 | T-b |
| 8/8 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH V2 0/8] Support HBM and CXL PMON uncore counters
From: Kan Liang <[email protected]>
Changes since V2:
- Update the description of patch 1 to explain the design of the new RB tree. (Tim)
The uncore PMON information of both HBM and CXL can be retrieved from the discovery table. However, the CXL entries break the driver's assumption for the discovery table. The first 7 patches update the generic support of the discovery table. The last patch enables the HBM and CXL PMON uncore counters.
The discovery table support was introduced since commit edae1f06c2cd ("perf/x86/intel/uncore: Parse uncore discovery tables"). It's a self-describing mechanism for the uncore PerfMon hardware. By reading through an MMIO page worth of information, SW can ‘discover’ all the standard uncore PMON registers.
The entire discovery table could be big and contain duplicate information. To save space, the perf uncore driver only stores some key data. Others are calculated from the key data. The driver further assumes that the uncore PMON units are symmetric among dies. So only the unit control addresses on Die 0 are completely stored. The addresses on other Dies can be calculated via the address of the first entry on the Die + a fixed offset.
However, it doesn't work for the CXL PMON units. The CXL PMON units could be asymmetric among Dies. The offset between CXL PMON units may be different on different Die.
To address the issue, the complete unit control addresses for all Dies are stored in an RB tree. For a 2-socket EMR, it requires at most ~6KB extra space, which should be acceptable.
Kan Liang (8):
perf/x86/uncore: Save the unit control address of all units perf/x86/uncore: Support per PMU cpumask
perf/x86/uncore: Retrieve the unit ID from the unit control RB tree perf/x86/uncore: Apply the unit control RB tree to MMIO uncore units perf/x86/uncore: Apply the unit control RB tree to MSR uncore units perf/x86/uncore: Apply the unit control RB tree to PCI uncore units perf/x86/uncore: Cleanup unused unit structure perf/x86/intel/uncore: Support HBM and CXL PMON counters
arch/x86/events/intel/uncore.c | 97 ++++--- arch/x86/events/intel/uncore.h | 8 +- arch/x86/events/intel/uncore_discovery.c | 306 +++++++++++++++-------- arch/x86/events/intel/uncore_discovery.h | 22 +- arch/x86/events/intel/uncore_snbep.c | 128 ++++++++-- 5 files changed, 388 insertions(+), 173 deletions(-)
Signature · 1 line
2.35.1