Skip to content

selftests/resctrl: MBA schemata ABI selftests for MPAM platforms

Richard Cheng linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests/resctrl: Add MBA schemata info selftesttools/testing/selftests/resctrl/mba_schemata_test.c tools/testing/selftests/resctrl/resctrl.h tools/testing/selftests/resctrl/resctrl_tests.c +1 more+277 -00 replies
2/4selftests/resctrl: Add MBA schemata write/read-back selftesttools/testing/selftests/resctrl/mba_schemata_test.c tools/testing/selftests/resctrl/resctrl.h tools/testing/selftests/resctrl/resctrl_tests.c +1 more+154 -00 replies
3/4selftests/resctrl: Add MBA schemata invalid-write selftesttools/testing/selftests/resctrl/mba_schemata_test.c tools/testing/selftests/resctrl/resctrl.h tools/testing/selftests/resctrl/resctrl_tests.c+125 -00 replies
4/4selftests/resctrl: Add MBA schemata per-group isolation selftesttools/testing/selftests/resctrl/mba_schemata_test.c tools/testing/selftests/resctrl/resctrl.h tools/testing/selftests/resctrl/resctrl_tests.c+133 -00 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/4] selftests/resctrl: MBA schemata ABI selftests for MPAM platforms

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

Signature · 1 line
2.43.0