Re: [PATCH v5 4/5] selftests/resctrl: Use bandwidth values for AMD MBA schemata

From: Reinette Chatre

Date: Wed Nov 04 2026 - 23:16:57 EST


Hi Swapnil,

On 11/4/26 8:05 PM, Swapnil Sapkal wrote:
> On 29-10-2026 00:15, Reinette Chatre wrote:
>> On 10/22/26 6:25 AM, Swapnil Sapkal wrote:
>>
>>> diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
>>> index 17ae73d3476c..947735e26099 100644
>>> --- a/tools/testing/selftests/resctrl/mba_test.c
>>> +++ b/tools/testing/selftests/resctrl/mba_test.c
>>> @@ -13,10 +13,51 @@
>>>   #define RESULT_FILE_NAME    "result_mba"
>>>   #define NUM_OF_RUNS        5
>>>   #define MAX_DIFF_PERCENT    15
>>> +
>>> +/* Intel MBA is specified as a percentage: 10%, 20% ... 100%. */
>>
>> The percentage based interface is the generic interface and not Intel specific.
>> You can drop "Intel" from references to this interface.
>>
>
> Sure, will do.
>
>>>   #define ALLOCATION_MAX        100
>>>   #define ALLOCATION_MIN        10
>>>   #define ALLOCATION_STEP        10
>>>   +/*
>>> + * AMD MBA is not a percentage but an absolute memory bandwidth value. The
>>> + * test sweeps the bandwidth from 4 GB/s to 40 GB/s in steps of 4 GB/s,
>>> + * which the hardware represents in units of 1/8 GB/s (i.e. 4 GB/s -> 32,
>>> + * 8 GB/s -> 64, ... 40 GB/s -> 320).
>>> + */
>>> +#define AMD_ALLOCATION_MAX    320
>>
>> The AMD maximum is enumerated from hardware. How can it be ensured this is
>> the appropriate maximum for all AMD systems?
>>
>
> As Babu mentioned, it's difficult for a single-threaded workload to
> reach the hardware-reported value. For that reason, I used these
> values to verify whether throttling takes effect.

Just to confirm, my question was not about needing this value to be the actual
maximum of a system. Instead, I just wanted to confirm that this "320" value that
is hardcoded here for all AMD systems is a _valid_ value. Since the actual maximum
value is enumerated from hardware it is not obvious to me that all systems will support
this hardcoded maximum.

Reinette