Skip to content

[26.04_linux-nvidia-7.3-next] Backport perf: Add NVIDIA Tegra410 uncore PMU events and metrics - #716

Closed
nvmochs wants to merge 7 commits into
NVIDIA:26.04_linux-nvidia-7.3-nextfrom
nvmochs:pmu_t410_uncore_events_73
Closed

nvmochs wants to merge 7 commits into
NVIDIA:26.04_linux-nvidia-7.3-nextfrom
nvmochs:pmu_t410_uncore_events_73

Conversation

@nvmochs

@nvmochs nvmochs commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Backport seven linux-next perf updates for NVIDIA Tegra410 (Vera). These add event aliases and derived metrics for UCF, PCIe, PCIe-TGT, CPU memory latency, and C2C PMUs.

The series also fixes multi-instance reporting:

• Preserve valid zero-count results on secondary sockets when uncore PMUs are merged.
• Handle both socket and root-complex suffixes in NVIDIA PCIe PMU names, correcting canonical-name matching, sorting, and aggregation.

All changes are confined to tools/perf; kernel drivers and the kernel ABI are unchanged. The patches applied cleanly to the 7.3-based branch.

Testing

• Built the ARM64 perf binary with GCC 15.2 and vendor event generation enabled.
• Tested on dual-socket Vera running Ubuntu 26.04 and kernel 7.3.0-1002-nvidia-64k.
• Passed all 12 selected upstream PMU self-tests, including event-table sanity, alias mapping, PMU naming, uncore sorting, and Tegra410 metric parsing.
• Ran the three new GLT cases end-to-end: 3 passed, 0 failed, 0 skipped, covering aliases/frequency metadata, secondary-socket zero counts, and PCIe naming/global merging.
• Confirmed hardware counter reads across both sockets. Older installed perf 7.0.14 reproduced the missing secondary zero row and rejected canonical PCIe PMU names; the backported binary handles both correctly.


Target platform: Vera
LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2174797

Add alias support for NVIDIA Tegra410 UCF PMU events and metrics.

Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 10eb6a6db5f5332c99bf93dcfb8f660359f628b6 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
Add alias support for NVIDIA Tegra410 PCIE PMU events and metrics.

Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 458a33f5618cea1873213b956f928376cfdb34b3 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
Add alias support for NVIDIA Tegra410 PCIE-TGT PMU events and metrics.

Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 86ee08cc2bb00117549cd5d0de4ae05e36591d02 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
…aliasing

Add alias support for NVIDIA Tegra410 CPU Memory Latency PMU events.

Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit af4fd99bbf63be260b7c0da4098d640193025ef1 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
Add alias support for NVIDIA Tegra410 C2C PMU events.

Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 98a3a883e6b557d417fbfe0d468d7170f46a602b linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
…unts

Commit dd15480 ("perf stat: Hide invalid uncore event output for
aggr mode") hides a 0 count of an uncore event in an aggregation id
that the event is not counted in, using the event's cpumask. When an
uncore event has more than one PMU instance, the evsels of the other
instances are merged into the evsel of the first one, and only the
cpumask of the first instance is checked. A 0 count in an aggregation
id covered only by another instance is then hidden, while a non-zero
count in the same id is printed.

For example, on a dual-socket NVIDIA Tegra410 with one UCF PMU per
socket (nvidia_ucf_pmu_0 on CPU 0, nvidia_ucf_pmu_1 on CPU 88):

Before:
  $ perf stat -a --per-socket -e UCF_SLC_ACCESS_ATOMIC,UCF_SLC_ACCESS_RD -- sleep 1
  S268435456    1                  0      UCF_SLC_ACCESS_ATOMIC
  S268435456    1          3,407,373      UCF_SLC_ACCESS_RD
  S285212672    1          2,086,640      UCF_SLC_ACCESS_RD

After:
  $ perf stat -a --per-socket -e UCF_SLC_ACCESS_ATOMIC,UCF_SLC_ACCESS_RD -- sleep 1
  S268435456    1                  0      UCF_SLC_ACCESS_ATOMIC
  S268435456    1          2,669,279      UCF_SLC_ACCESS_RD
  S285212672    1                  0      UCF_SLC_ACCESS_ATOMIC
  S285212672    1          1,006,579      UCF_SLC_ACCESS_RD

Also check the cpumasks of the evsels merged into the counter. Zero
counts are still hidden in aggregation ids that none of the instances
count in, such as the other cores in --per-core mode. Core PMUs and
--no-aggr output are unchanged.

Fixes: dd15480 ("perf stat: Hide invalid uncore event output for aggr mode")
Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 1de8706aa07782c7f825f05bdfec2a58ab4bfff4 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
The NVIDIA PCIe and PCIe target PMUs are named <name>_<socket>_rc_<rc>,
like nvidia_pcie_pmu_1_rc_3. pmu_name_len_no_suffix() only strips the
last number, so perf treats the PMUs of each socket as a different PMU.
An event or metric on all PCIe PMUs then gives one result per socket,
each labelled with the first RC of its socket.

Make pmu_name_len_no_suffix() strip both numbers of these names, so the
instances on all sockets are merged as one PMU, nvidia_pcie_pmu or
nvidia_pcie_tgt_pmu. Also accept that name on the command line, as perf
list shows it, and sort these PMUs by socket and then by RC.

Suggested-by: Ian Rogers <[email protected]>
Signed-off-by: Besar Wicaksono <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
(cherry picked from commit 38539b1099923eeb9ef9ee5c6e842e9d8f7b1962 linux-next)
Signed-off-by: Matthew R. Ochs <[email protected]>
@nirmoy nirmoy added the help wanted Extra attention is needed label Nov 18, 2026
@nirmoy

nirmoy commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Caution

⚠️ Review incomplete

Boro could not review 1 commit.

Findings: unavailable because the review failed
Review failures: 1

🔍 Review artifacts

📦 Build checks — 🟡 2/4 passed

  • 🟢 amd64: build report and 4 debs
  • 🟢 arm64: build report and 4 debs
  • 🟡 amd64: NVIDIA driver and DOCA not configured for 26.04_linux-nvidia-7.3-next
  • 🟡 arm64: NVIDIA driver and DOCA not configured for 26.04_linux-nvidia-7.3-next

Install the PR kernel with APT

Published for reviewed head c58f1db7b46f: noble/amd64. Requires the NVIDIA network.

curl -fsS https://baseos-reviewer-66d7b9.gitlab-master-pages.nvidia.com/install.sh | bash -s -- install pr-716
Manual installation

Manual setup · signing fingerprint DF52E10C47F28AC221DA19ED6D25A5DFC6686DFC

Manual commands for Ubuntu 24.04 Noble / amd64, on the NVIDIA network:

(
set -euo pipefail
work=$(mktemp -d)
trap 'rm -rf -- "$work"' EXIT
curl -qfsS --proto '=https' -o "$work/archive-keyring.gpg" https://baseos-reviewer-66d7b9.gitlab-master-pages.nvidia.com/archive-keyring.gpg
curl -qfsS --proto '=https' -o "$work/baseos-internal-tools.crt" https://baseos-reviewer-66d7b9.gitlab-master-pages.nvidia.com/baseos-internal-tools.crt
sudo install -d -m 0755 /etc/apt/keyrings
sudo install -m 0644 "$work/archive-keyring.gpg" /usr/share/keyrings/baseos-pr-kernels.gpg
sudo install -m 0644 "$work/baseos-internal-tools.crt" /etc/apt/keyrings/baseos-pr-https.crt
printf '%s\n' \
  'Acquire::https::baseos-internal-tools.nvidia.com::CaInfo "/etc/apt/keyrings/baseos-pr-https.crt";' \
  'Acquire::https::baseos-internal-tools.nvidia.com::Verify-Peer "true";' \
  'Acquire::https::baseos-internal-tools.nvidia.com::Verify-Host "true";' | \
  sudo tee /etc/apt/apt.conf.d/90baseos-pr-kernels >/dev/null
printf '%s\n' 'deb [arch=amd64 signed-by=/usr/share/keyrings/baseos-pr-kernels.gpg] https://baseos-internal-tools.nvidia.com:4001/reviews/apt/NVIDIA/NV-Kernels/716/noble/amd64 noble main' | \
  sudo tee /etc/apt/sources.list.d/nv-kernels-pr716.list >/dev/null
sudo apt update --error-on=any
sudo apt install --no-remove nv-kernels-pr-716
)

The repository remains configured. Later apt update and apt install nv-kernels-pr-716 pick up newly published builds; APT verifies signed metadata with the shown Signed-By key.

Note

Build reports and debs are retained for 10 days after the PR closes.

  • ⚪ PR Illustrated: inactive
Review metadata
  • Reviewed head: c58f1db7b46f
  • Overall status: incomplete
  • Build checks: 2/4 passed

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 7 commits...

Cherry-pick digest:
E: c58f1db7b46f ("perf pmus: Treat both numbers of NVIDIA "): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 38539b109992 is not resolvable
E: 98986172466f ("perf stat: Check merged PMU instance's c"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 1de8706aa077 is not resolvable
E: a410e5e0e094 ("perf jevents: Add support for NVIDIA Teg"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 98a3a883e6b5 is not resolvable
E: 38b4cc5a6476 ("perf jevents: Add support for NVIDIA Teg"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA af4fd99bbf63 is not resolvable
E: 517be3a84b92 ("perf jevents: Add support for NVIDIA Teg"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 86ee08cc2bb0 is not resolvable
E: 3fc95fb28f19 ("perf jevents: Add support for NVIDIA Teg"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 458a33f5618c is not resolvable
E: 9b5a1c7f537e ("perf jevents: Add support for NVIDIA Teg"): linux-next cherry-pick needs a public patch Link: trailer (patch.msgid.link, lore.kernel.org or patchwork.kernel.org); SHA 10eb6a6db5f5 is not resolvable
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c58f1db7b46f │ 38539b109992                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 98986172466f │ 1de8706aa077                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ a410e5e0e094 │ 98a3a883e6b5                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 38b4cc5a6476 │ af4fd99bbf63                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 517be3a84b92 │ 86ee08cc2bb0                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 3fc95fb28f19 │ 458a33f5618c                                                     │ ERROR      │ ERROR   │ ERROR                     │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 9b5a1c7f537e │ 10eb6a6db5f5                                                     │ ERROR      │ ERROR   │ ERROR                     │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint results:
W: 98986172466f ("perf stat: Check merged PMU instance's cpumasks wh"): subject 73 chars (>72)
W: 38b4cc5a6476 ("perf jevents: Add support for NVIDIA Tegra410 CPU "): subject 77 chars (>72)

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

Acked-by: Jamie Nguyen <[email protected]>

@clsotog

clsotog commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Acked-by: Carol L Soto <[email protected]>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed has_1_ack labels Nov 18, 2026
@nvmochs

nvmochs commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Merged, closing PR.

dfab3ddf1ed4 (nresolute/nvidia-7.3-next) perf pmus: Treat both numbers of NVIDIA PCIe PMU names as suffix
6ab83a092c89 perf stat: Check merged PMU instance's cpumasks when skipping zero counts
0d10e68f77c1 perf jevents: Add support for NVIDIA Tegra410 C2C PMU aliasing
44f8b42ecf74 perf jevents: Add support for NVIDIA Tegra410 CPU Memory Latency PMU aliasing
c2124c0b0164 perf jevents: Add support for NVIDIA Tegra410 PCIE-TGT PMU aliasing
ee1e1956a2d5 perf jevents: Add support for NVIDIA Tegra410 PCIE PMU aliasing
0a308acb385a perf jevents: Add support for NVIDIA Tegra410 UCF PMU aliasing

@nvmochs nvmochs closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants