Skip to content

selftests/resctrl: Run the MBA test on arm64 MPAM via the NVIDIA SCF PMU

Richard Cheng linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5selftests/resctrl: Make memory bandwidth measurement vendor-neutraltools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c tools/testing/selftests/resctrl/resctrl.h +1 more+114 -1160 replies
2/5selftests/resctrl: Abstract reference bandwidth counters behind a backendtools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c tools/testing/selftests/resctrl/resctrl.h +1 more+141 -110 replies
3/5selftests/resctrl: Support the MPAM memory bandwidth monitoring layouttools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/resctrl_val.c tools/testing/selftests/resctrl/resctrlfs.c+111 -60 replies
4/5selftests/resctrl: Gate the MBA test on features, not CPU vendortools/testing/selftests/resctrl/mba_test.c+6 -10 replies
5/5selftests/resctrl: Add NVIDIA SCF reference bandwidth backendtools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/resctrl_val.c+162 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] selftests/resctrl: Run the MBA test on arm64 MPAM via the NVIDIA SCF PMU

The resctrl MBA selftest is currently Intel-only: the test is vendor-gated to GenuineIntel and its reference bandwidth measurement is hard-wired to the Intel iMC uncore PMU. MPAM on arm64 exposes the same MB resource through resctrl, and NVIDIA Grace/Vera systems provide an uncore PMU (the SoC coherency fabric, SCF) that can serve as the same kind of independent reference that the iMC provides on x86.

Patches 1-2 decouple the test machinery from the iMC with no functional change and no NVIDIA code: a mechanical rename, then a small backend abstraction (detect()/setup_counters()) with the iMC as the only backend. Patch 3 teaches the framework the MPAM memory bandwidth monitoring layout (NUMA-node-keyed MB domains, MB_MON's mbm_total_bytes, ABMC counter assignment). Patch 4 switches the MBA test from vendor gating to feature detection. Patch 5 adds the NVIDIA SCF PMU as a reference bandwidth backend, making the MBA test runnable on arm64.

The series builds after each patch, and mid-series behavior is sane:
on arm64 the MBA test skips cleanly until patch 5, after which it runs and passes. x86 behavior is preserved throughout - the iMC stays the default backend and the mbm_local_bytes comparison path is unchanged.

This series applies on top of the 26.04_linux-nvidia.glue.others.cpu_less.hardlimit branch of

https://github.com/fyu1/NV-Kernels.fenghuay.baseos

The base-commit recorded below is the current tip of that branch.

Validated on a two-socket VR-NVL72 (Vera) system: the SCF-measured bandwidth and resctrl mbm_total_bytes agree within 3-4% across all MBA schemata levels (10%..100%), against the test's 8% threshold.

Richard Cheng (5):
selftests/resctrl: Make memory bandwidth measurement vendor-neutral selftests/resctrl: Abstract reference bandwidth counters behind a
backend
selftests/resctrl: Support the MPAM memory bandwidth monitoring layout selftests/resctrl: Gate the MBA test on features, not CPU vendor selftests/resctrl: Add NVIDIA SCF reference bandwidth backend

 tools/testing/selftests/resctrl/mba_test.c    |  38 +-
 tools/testing/selftests/resctrl/mbm_test.c    |  23 +-
 tools/testing/selftests/resctrl/resctrl.h     |   6 +-
 tools/testing/selftests/resctrl/resctrl_val.c | 530 ++++++++++++++----
 tools/testing/selftests/resctrl/resctrlfs.c   |  45 +-
 5 files changed, 519 insertions(+), 123 deletions(-)

base-commit: 475f355d0408698d9f632ba3b9a5dfb1f91e928b

Signature · 1 line
2.43.0