Skip to content

selftests/resctrl: Enable MBM and MBA tests on AMD

Babu Moger linux-kselftest lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 11 repliesIn review
  2. v24 patches 12 repliesSuperseded
  3. v14 patches 9 repliesSuperseded

Changes in v3 from the cover letter

Note: Based the series on top of latest kselftests/master 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (tag: v6.10-rc1).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests/resctrl: Rename variables and functions to generic namestools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c tools/testing/selftests/resctrl/resctrl.h +2 more+138 -1372 replies
2/4selftests/resctrl: Pass sysfs controller name of the vendortools/testing/selftests/resctrl/resctrl_val.c+14 -82 replies
3/4selftests/resctrl: Add support for MBM and MBA tests on AMDtools/testing/selftests/resctrl/resctrl_val.c+50 -302 replies
4/4selftests/resctrl: Enable MBA/MBA tests on AMDtools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c+0 -22 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD

The MBM (Memory Bandwidth Monitoring) and MBA (Memory Bandwidth Allocation) features are not enabled for AMD systems. The reason was lack of perf counters to compare the resctrl test results.

Starting with the commit
25e56847821f ("perf/x86/amd/uncore: Add memory controller support"), AMD now supports the UMC (Unified Memory Controller) perf events. These events can be used to compare the test results.

This series adds the support to detect the UMC events and enable MBM/MBA tests for AMD systems.

v3:
Note: Based the series on top of latest kselftests/master 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (tag: v6.10-rc1).

Also applied the patches from the series
https://lore.kernel.org/lkml/[email protected]/

Separated the fix patch.
Renamed the imc to just mc to make it generic. Changed the search string "uncore_imc_" and "amd_umc_" Changes related rebase to latest kselftest tree.

v2: Changes.
a. Rebased on top of tip/master (Apr 25, 2024)
b. Addressed Ilpo comments except the one about close call.
It seems more clear to keep READ and WRITE separate.
https://lore.kernel.org/lkml/[email protected]/
c. Used ksft_perror call when applicable.
d. Added vendor check for non contiguous CBM check.

v1: https://lore.kernel.org/lkml/[email protected]/

Babu Moger (4):
selftests/resctrl: Rename variables and functions to generic names selftests/resctrl: Pass sysfs controller name of the vendor selftests/resctrl: Add support for MBM and MBA tests on AMD selftests/resctrl: Enable MBA/MBA tests on AMD

 tools/testing/selftests/resctrl/mba_test.c    |  25 +-
 tools/testing/selftests/resctrl/mbm_test.c    |  23 +-
 tools/testing/selftests/resctrl/resctrl.h     |   2 +-
 tools/testing/selftests/resctrl/resctrl_val.c | 305 ++++++++++--------
 tools/testing/selftests/resctrl/resctrlfs.c   |   2 +-
 5 files changed, 191 insertions(+), 166 deletions(-)
Signature · 1 line
2.34.1