All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] selftests/resctrl: MBA schemata ABI selftests for MPAM platforms
@ 2026-07-22  2:10 Richard Cheng
  2026-07-22  2:10 ` [PATCH 1/4] selftests/resctrl: Add MBA schemata info selftest Richard Cheng
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Richard Cheng @ 2026-07-22  2:10 UTC (permalink / raw)
  To: tony.luck, reinette.chatre, x86
  Cc: Dave.Martin, james.morse, babu.moger, shuah, linux-kernel,
	linux-kselftest, newtonl, kristinc, kobak, kaihengf, fenghuay,
	ltrager, Richard Cheng

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-22  2:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  2:10 [PATCH 0/4] selftests/resctrl: MBA schemata ABI selftests for MPAM platforms Richard Cheng
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

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.