From: Jacob Lefkowitz via B4 Relay <devnull+jlefkowi.akamai.com@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
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>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Ben Chaney <bchaney@akamai.com>,
Matt Pelland <mpelland@akamai.com>,
Jacob Lefkowitz <jlefkowi@akamai.com>
Subject: [PATCH v2 0/2] perf jevents: Add IOMMU PTW & device entry metrics
Date: Mon, 02 Nov 2026 21:14:15 +0000 [thread overview]
Message-ID: <20261102-perf-tools-next-v2-0-4d237f886710@akamai.com> (raw)
Adds AMD specific metrics for the IOMMU with respect to page table
walks and device table entires. The metrics cover ratios, rates, and
percentages with respect to any event which might be triggered during
a page table walk or device table entry lookup.
The metrics target Zen 2+ processors and use the standard amd_iommu
PMU events. All metrics are tested with 'sleep 10' and behave as
expected. An example output of sleep 10 is provided within each
individual change.
The changes are split into two patches:
1. perf jevents: add iommu page table walk metrics
2. perf jevents: add amd specific device table entry metrics
The specific metris added are:
- lpm_iommu_dte_miss_rate
- lpm_iommu_dte_lookups
- lpm_iommu_ptw_reads_per_tlb_miss
- lpm_iommu_ptw_nested_read_ratio
- lpm_iommu_ptw_guest_read_ratio
- lpm_iommu_trans_per_sec
Signed-off-by: Jacob Lefkowitz <jlefkowi@akamai.com>
---
Changes in v2:
- Drop min() wrappers d_ratio() for the IOMMU ratio metrics: min(NaN, 1)
evaluated to 1, reporting a false 100% on sockets with no amd_counts
- Did not test with previously mentioned custom workload and did not add
to the workloads collection. The workload stressed the CPU TLB,
but the IOMMU only translates device DMA, so the load never reaches
the IOMMU.
- Remove unused min import
- Remove global declaration of '_zen_model' within each function
- Link to v1: https://lore.kernel.org/r/20261029-perf-tools-next-v1-0-a75a2b64a15e@akamai.com
---
Jacob Lefkowitz (2):
perf jevents: add iommu page table walk metrics
perf jevents: add amd specific device table entry metrics
tools/perf/pmu-events/amd_metrics.py | 75 ++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
---
base-commit: 1c90f0a3c8a1c4e38f9edd97af9e20848805a7fb
change-id: 20261028-perf-tools-next-8fd1d433316a
Best regards,
--
Jacob Lefkowitz <jlefkowi@akamai.com>
next reply other threads:[~2026-11-02 21:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 21:14 Jacob Lefkowitz via B4 Relay [this message]
2026-11-02 21:14 ` [PATCH v2 1/2] perf jevents: add iommu page table walk metrics Jacob Lefkowitz via B4 Relay
2026-11-02 21:14 ` [PATCH v2 2/2] perf jevents: add amd specific device table entry metrics Jacob Lefkowitz via B4 Relay
2026-11-10 3:22 ` [PATCH v2 0/2] perf jevents: Add IOMMU PTW & device " Hang Zhengyang
2026-11-14 3:29 ` Ravi Bangoria
2026-11-16 10:15 ` Vasant Hegde
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=20261102-perf-tools-next-v2-0-4d237f886710@akamai.com \
--to=devnull+jlefkowi.akamai.com@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bchaney@akamai.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jlefkowi@akamai.com \
--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=mpelland@akamai.com \
--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
all inboxes | Powered by JetHome®