Linux Perf Users
 help / color / mirror / Atom feed
From: Chun-Tse Shao <ctshao@google.com>
To: Perry Taylor <perry.taylor@intel.com>,
	Dapeng Mi <dapeng1.mi@intel.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 James Clark <james.clark@linaro.org>,
	Sandipan Das <sandipan.das@amd.com>,
	 linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Chun-Tse Shao <ctshao@google.com>
Subject: [PATCH v2 0/2] Add IOMMU TLB and interrupt metrics
Date: Thu, 28 May 2026 16:44:53 -0700	[thread overview]
Message-ID: <20260528234455.434027-1-ctshao@google.com> (raw)

This patch series adds IOMMU Translation Lookaside Buffer (TLB) and
interrupt cache metrics to perf jevents for both AMD and Intel platforms.
This enhances I/O performance observability, allowing fleet-wide monitoring
of IOMMU overhead.

The changes are split into two patches:
1. perf jevents: Add IOMMU metrics for AMD
   - Adds IOMMU TLB and interrupt metrics for Zen 2+ processors using
     standard AMD IOMMU PMU events.
   - Note that pde events on AMD cover both 2M and 1G pages, so 1G pages
     are implicitly included.
   - Added code comments to clarify this hardware detail and fixed
     indentation to match the file's style.

2. perf jevents: Add IOMMU metrics for Intel
   - Adds IOMMU TLB and interrupt metrics using uncore IIO IOMMU events.
   - Supports Emerald Rapids (TLB-only) and Granite Rapids (TLB +
     Interrupt) by dynamically detecting event availability and making
     interrupt metrics optional.
   - Clamped calculated interrupt cache miss metric to zero to prevent
     negative values due to counter multiplexing or sampling skid.

v2:
  Split the changes into separate AMD and Intel commits as requested.

v1: lore.kernel.org/20260527223917.3845056-1-ctshao@google.com

Chun-Tse Shao (2):
  perf jevents: Add IOMMU metrics for AMD
  perf jevents: Add IOMMU metrics for Intel

 tools/perf/pmu-events/amd_metrics.py   | 57 +++++++++++++++++++++++
 tools/perf/pmu-events/intel_metrics.py | 62 ++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

--
2.54.0.823.g6e5bcc1fc9-goog


             reply	other threads:[~2026-05-28 23:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 23:44 Chun-Tse Shao [this message]
2026-05-28 23:44 ` [PATCH v2 1/2] perf jevents: Add IOMMU metrics for AMD Chun-Tse Shao
2026-05-29  9:26   ` Sandipan Das
2026-05-30  0:11     ` Arnaldo Carvalho de Melo
2026-05-28 23:44 ` [PATCH v2 2/2] perf jevents: Add IOMMU metrics for Intel Chun-Tse Shao

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=20260528234455.434027-1-ctshao@google.com \
    --to=ctshao@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dapeng1.mi@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=perry.taylor@intel.com \
    --cc=peterz@infradead.org \
    --cc=sandipan.das@amd.com \
    /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