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

Babu Moger posted 4 patches 1 year, 9 months ago
There is a newer version of this series
tools/testing/selftests/resctrl/cat_test.c    |   2 +-
tools/testing/selftests/resctrl/mba_test.c    |   1 -
tools/testing/selftests/resctrl/mbm_test.c    |   1 -
tools/testing/selftests/resctrl/resctrl_val.c | 142 +++++++++++++-----
4 files changed, 103 insertions(+), 43 deletions(-)
[PATCH v2 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD
Posted by Babu Moger 1 year, 9 months ago
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.

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/8e4badb7-6cc5-61f1-e041-d902209a90d5@linux.intel.com/
    c. Used ksft_perror call when applicable.
    d. Added vendor check for non contiguous CBM check.
  
v1: https://lore.kernel.org/lkml/cover.1708637563.git.babu.moger@amd.com/

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: Enable MBA/MBA tests on AMD

 tools/testing/selftests/resctrl/cat_test.c    |   2 +-
 tools/testing/selftests/resctrl/mba_test.c    |   1 -
 tools/testing/selftests/resctrl/mbm_test.c    |   1 -
 tools/testing/selftests/resctrl/resctrl_val.c | 142 +++++++++++++-----
 4 files changed, 103 insertions(+), 43 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD
Posted by Reinette Chatre 1 year, 9 months ago
Hi Babu,

On 4/25/2024 1:16 PM, Babu Moger wrote:
> 
> 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.
> 
> v2: Changes.
>     a. Rebased on top of tip/master (Apr 25, 2024)

Please note that resctrl selftest changes flow upstream via the kselftest
repo. The latest resctrl selftest changes can be found on the "next" branch
there.

Reinette
Re: [PATCH v2 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD
Posted by Moger, Babu 1 year, 8 months ago
Hi Reinette,

On 5/9/24 16:10, Reinette Chatre wrote:
> Hi Babu,
> 
> On 4/25/2024 1:16 PM, Babu Moger wrote:
>>
>> 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.
>>
>> v2: Changes.
>>     a. Rebased on top of tip/master (Apr 25, 2024)
> 
> Please note that resctrl selftest changes flow upstream via the kselftest
> repo. The latest resctrl selftest changes can be found on the "next" branch
> there.

Yes. Got it.
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/
-- 
Thanks
Babu Moger