public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kan.liang@linux.intel.com
To: peterz@infradead.org, mingo@kernel.org, acme@kernel.org,
	namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org
Cc: ak@linux.intel.com, eranian@google.com,
	Kan Liang <kan.liang@linux.intel.com>
Subject: [PATCH V3 00/13] Support Lunar Lake and Arrow Lake core PMU
Date: Wed, 26 Jun 2024 07:35:32 -0700	[thread overview]
Message-ID: <20240626143545.480761-1-kan.liang@linux.intel.com> (raw)

From: Kan Liang <kan.liang@linux.intel.com>

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 (13):
  perf/x86/intel: Support the PEBS event mask
  perf/x86: Support counter mask
  perf/x86: Add Lunar Lake and Arrow Lake support
  perf/x86/intel: Rename model-specific pebs_latency_data functions
  perf/x86/intel: Support new data source for Lunar Lake
  perf/x86: Add config_mask to represent EVENTSEL bitmask
  perf/x86/intel: Support PERFEVTSEL extension
  perf/x86/intel: Support Perfmon MSRs aliasing
  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           |  26 +-
 arch/x86/events/core.c               | 123 +++----
 arch/x86/events/intel/core.c         | 471 ++++++++++++++++++++-------
 arch/x86/events/intel/ds.c           | 288 +++++++++++++---
 arch/x86/events/intel/knc.c          |   2 +-
 arch/x86/events/intel/p4.c           |  12 +-
 arch/x86/events/intel/p6.c           |   2 +-
 arch/x86/events/perf_event.h         | 105 +++++-
 arch/x86/events/perf_event_flags.h   |   2 +-
 arch/x86/events/zhaoxin/core.c       |  14 +-
 arch/x86/include/asm/intel_ds.h      |   1 +
 arch/x86/include/asm/msr-index.h     |   6 +
 arch/x86/include/asm/perf_event.h    |  27 ++
 include/uapi/linux/perf_event.h      |   6 +-
 kernel/events/core.c                 |  15 +-
 tools/perf/Documentation/topdown.txt |   9 +-
 16 files changed, 839 insertions(+), 270 deletions(-)

-- 
2.38.1


             reply	other threads:[~2024-06-26 14:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 14:35 kan.liang [this message]
2024-06-26 14:35 ` [PATCH V3 01/13] perf/x86/intel: Support the PEBS event mask kan.liang
2024-06-28  8:42   ` Peter Zijlstra
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 02/13] perf/x86: Support counter mask kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 03/13] perf/x86: Add Lunar Lake and Arrow Lake support kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 04/13] perf/x86/intel: Rename model-specific pebs_latency_data functions kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 05/13] perf/x86/intel: Support new data source for Lunar Lake kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 06/13] perf/x86: Add config_mask to represent EVENTSEL bitmask kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 07/13] perf/x86/intel: Support PERFEVTSEL extension kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 08/13] perf/x86/intel: Support Perfmon MSRs aliasing kan.liang
2024-07-05 21:06   ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 09/13] perf/x86: Extend event update interface kan.liang
2024-06-26 14:35 ` [PATCH V3 10/13] perf: Extend perf_output_read kan.liang
2024-06-26 14:35 ` [PATCH V3 11/13] perf/x86/intel: Move PEBS event update after the sample output kan.liang
2024-06-26 14:35 ` [PATCH V3 12/13] perf/x86/intel: Support PEBS counters snapshotting kan.liang
2024-06-26 14:35 ` [PATCH V3 13/13] perf/x86/intel: Support RDPMC metrics clear mode kan.liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240626143545.480761-1-kan.liang@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox