Skip to content

Support Lunar Lake and Arrow Lake core PMU

[email protected] lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 4 repliesIn review
  2. v313 patches 1 replyApplied
  3. v213 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v1 posting 2/212 patches21 repliesSuperseded
v1 posting 1/24 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Rebase on top of the 6.11-rc1
- Remove the patches which has been merged.
V3 can be found at
https://lore.kernel.org/lkml/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf/x86: Extend event update interfacearch/x86/events/amd/core.c arch/x86/events/core.c arch/x86/events/intel/core.c +3 more+36 -274 replies
2/5perf: Extend perf_output_readkernel/events/core.c+8 -70 replies
3/5perf/x86/intel: Move PEBS event update after the sample outputarch/x86/events/intel/ds.c+11 -110 replies
4/5perf/x86/intel: Support PEBS counters snapshottingarch/x86/events/intel/core.c arch/x86/events/intel/ds.c arch/x86/events/perf_event.h +2 more+157 -100 replies
5/5perf/x86/intel: Support RDPMC metrics clear modearch/x86/events/intel/core.c arch/x86/events/perf_event.h arch/x86/include/asm/perf_event.h +1 more+31 -30 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAndi KleenIan Rogers
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH V4 0/5] Support Lunar Lake and Arrow Lake core PMU

From: Kan Liang <[email protected]>

Changes since V3:
- Rebase on top of the 6.11-rc1
- Remove the patches which has been merged.
V3 can be found at
https://lore.kernel.org/lkml/[email protected]/

Changes since V2:
- Rebase on top of the tip.git. Specifically on top of the below two patches.
commit cd84351c8c1b ("perf/x86/amd: Use try_cmpxchg() in events/amd/{un,}core.c") commit d142df13f357 ("perf/x86/intel: Switch to new Intel CPU model defines")
- Add Reviewed-by tag from Ian

Changes since V1:
- Add x86/intel_pmu_max_num_pebs/counters/counters_fixed()
- Rename model-specific pebs_latency_data functions
- Rename V6 counter MSRs

From the core PMU' perspective, the Lunar Lake and Arrow Lake are the same, which are similar to the previous generation Meteor Lake. Both are hybrid platforms, with e-core and p-core.

The key differences include:
- The e-core supports 3 new fixed counters
- The p-core supports an updated PEBS Data Source format
- More GP counters (Updated event constraint table)
- New Architectural performance monitoring V6 (New Perfmon MSRs aliasing, umask2, eq).
- New PEBS format V6 (Counters Snapshotting group)
- New RDPMC metrics clear mode

The details for the above new features can be found in the Intel Architecture Instruction Set Extensions and Future Features (052).
https://cdrdv2.intel.com/v1/dl/getContent/671368

The counters may not be continuous anymore. Patch 1-2 converts the max number of counters to a mask of counters. The change is a generic change which impacts all X86 platforms.

Patch 3-5 supports all the legacy features on LNL and ARL.

Patch 6-8 supports the new Architectural performance monitoring V6.

Patch 9-12 supports the new PEBS format V6.

Patch 13 supports the new RDPMC metrics clear mode.

Only the two features (Architectural performance monitoring V6 and the RDPMC metrics clear mode) add new formats, which impacts the ABI. The "Sysfs PMU tests" case has covered the non-contiguous format definition caused by the new umask. The current perf test should be good enough to cover the ABI changes.

Kan Liang (5):
perf/x86: Extend event update interface
perf: Extend perf_output_read
perf/x86/intel: Move PEBS event update after the sample output perf/x86/intel: Support PEBS counters snapshotting perf/x86/intel: Support RDPMC metrics clear mode

 arch/x86/events/amd/core.c           |   2 +-
 arch/x86/events/core.c               |  13 +--
 arch/x86/events/intel/core.c         |  93 +++++++++++++++-----
 arch/x86/events/intel/ds.c           | 122 ++++++++++++++++++++++++---
 arch/x86/events/intel/p4.c           |   2 +-
 arch/x86/events/perf_event.h         |   8 +-
 arch/x86/events/perf_event_flags.h   |   2 +-
 arch/x86/events/zhaoxin/core.c       |   2 +-
 arch/x86/include/asm/perf_event.h    |  19 +++++
 kernel/events/core.c                 |  15 ++--
 tools/perf/Documentation/topdown.txt |   9 +-
 11 files changed, 236 insertions(+), 51 deletions(-)
Signature · 1 line
2.38.1