Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: tony.luck@intel.com, reinette.chatre@intel.com, x86@kernel.org
Cc: Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, newtonl@nvidia.com,
	kristinc@nvidia.com, kobak@nvidia.com, kaihengf@nvidia.com,
	fenghuay@nvidia.com, ltrager@nvidia.com,
	Richard Cheng <icheng@nvidia.com>
Subject: [PATCH 0/5] selftests/resctrl: Run the MBA test on arm64 MPAM via the NVIDIA SCF PMU
Date: Wed, 22 Jul 2026 10:12:58 +0800	[thread overview]
Message-ID: <20260722021303.9471-1-icheng@nvidia.com> (raw)

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
-- 
2.43.0


             reply	other threads:[~2026-07-22  2:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  2:12 Richard Cheng [this message]
2026-07-22  2:12 ` [PATCH 1/5] selftests/resctrl: Make memory bandwidth measurement vendor-neutral Richard Cheng
2026-07-22  2:13 ` [PATCH 2/5] selftests/resctrl: Abstract reference bandwidth counters behind a backend Richard Cheng
2026-07-22  2:13 ` [PATCH 3/5] selftests/resctrl: Support the MPAM memory bandwidth monitoring layout Richard Cheng
2026-07-22  2:13 ` [PATCH 4/5] selftests/resctrl: Gate the MBA test on features, not CPU vendor Richard Cheng
2026-07-22  2:13 ` [PATCH 5/5] selftests/resctrl: Add NVIDIA SCF reference bandwidth backend Richard Cheng

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=20260722021303.9471-1-icheng@nvidia.com \
    --to=icheng@nvidia.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=fenghuay@nvidia.com \
    --cc=james.morse@arm.com \
    --cc=kaihengf@nvidia.com \
    --cc=kobak@nvidia.com \
    --cc=kristinc@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=ltrager@nvidia.com \
    --cc=newtonl@nvidia.com \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.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