[0/4] selftests/resctrl: Enable MBM and MBA tests on AMD

Message ID cover.1708637563.git.babu.moger@amd.com
Headers
Series selftests/resctrl: Enable MBM and MBA tests on AMD |

Message

Moger, Babu Feb. 22, 2024, 9:35 p.m. UTC
  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.


Babu Moger (4):
  selftests/resctrl: Rename variable imcs and num_of_imcs() 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: Skip the tests if iMC/UMC counters are unavailable

 tools/testing/selftests/resctrl/resctrl.h     |   1 +
 .../testing/selftests/resctrl/resctrl_tests.c |  16 ++-
 tools/testing/selftests/resctrl/resctrl_val.c | 105 ++++++++++++++----
 3 files changed, 96 insertions(+), 26 deletions(-)