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/4] selftests/resctrl: MBA schemata ABI selftests for MPAM platforms
Date: Wed, 22 Jul 2026 10:10:53 +0800 [thread overview]
Message-ID: <20260722021057.9370-1-icheng@nvidia.com> (raw)
The MPAM MBA enablement carried in this tree exposes memory-bandwidth
allocation through the resctrl "MB" schemata, but none of it is covered
by the in-tree resctrl selftests: the existing mba_test/mbm_test are
ARCH_INTEL-gated throughput tests that validate against the Intel iMC
PMU and map domains via L3 cache ids, so they skip (and cannot work) on
aarch64/MPAM, where MB domains are NUMA proximity ids. Any regression
in the MB control plane currently ships unnoticed.
Add four deterministic, workload-free ABI tests in a shared
MBA_SCHEMATA group, one resctrl_test entry each:
1. MBA_SCHEMATA_INFO - sane control contract (schema_format, gran,
min_bandwidth, num_closids) and default
schemata at 100% on every domain
2. MBA_SCHEMATA_RW - percentages take effect and read back
exactly, per domain, including restore
3. MBA_SCHEMATA_INVAL - out-of-range/malformed/bad-domain writes
are rejected with the documented
last_cmd_status diagnostics
4. MBA_SCHEMATA_ISOLATE - two groups keep independent caps; the
default group is never perturbed
All cases are feature-gated (schema_format == percentage) and skip
cleanly elsewhere; no workload or measurement is involved, so they are
CI-safe and flake-free. The Intel tests are left untouched. The tests
are written upstream-shaped for eventual submission.
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
Tested on an NVIDIA Grace (Vera) system with MPAM MBA enabled (two MB
domains): sudo ./resctrl_tests -t MBA_SCHEMATA -> 4/4 pass.
The newly added test file fires a warning when using checkpatch.pl .
Richard Cheng (4):
selftests/resctrl: Add MBA schemata info selftest
selftests/resctrl: Add MBA schemata write/read-back selftest
selftests/resctrl: Add MBA schemata invalid-write selftest
selftests/resctrl: Add MBA schemata per-group isolation selftest
.../selftests/resctrl/mba_schemata_test.c | 521 ++++++++++++++++++
tools/testing/selftests/resctrl/resctrl.h | 7 +
.../testing/selftests/resctrl/resctrl_tests.c | 4 +
tools/testing/selftests/resctrl/resctrlfs.c | 157 ++++++
4 files changed, 689 insertions(+)
create mode 100644 tools/testing/selftests/resctrl/mba_schemata_test.c
base-commit: 475f355d0408698d9f632ba3b9a5dfb1f91e928b
--
2.43.0
next reply other threads:[~2026-07-22 2:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 2:10 Richard Cheng [this message]
2026-07-22 2:10 ` [PATCH 1/4] selftests/resctrl: Add MBA schemata info selftest Richard Cheng
2026-07-22 2:10 ` [PATCH 2/4] selftests/resctrl: Add MBA schemata write/read-back selftest Richard Cheng
2026-07-22 2:10 ` [PATCH 3/4] selftests/resctrl: Add MBA schemata invalid-write selftest Richard Cheng
2026-07-22 2:10 ` [PATCH 4/4] selftests/resctrl: Add MBA schemata per-group isolation selftest 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=20260722021057.9370-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.