Re: [PATCH v3 45/47] arm_mpam: Add workaround for T241-MPAM-4

Fenghua Yu
2026-01-29T22:14:54Z

Hi, Ben,

On 1/19/26 12:56, Ben Horgan wrote:
> Hi Fenghua,
>
> On 1/15/26 23:20, Fenghua Yu wrote:
>> Hi, Shanker and Ben,
>>
>> On 1/12/26 08:59, Ben Horgan wrote:
>>> From: Shanker Donthineni <sdonthineni@nvidia.com>
>>>
>>> In the T241 implementation of memory-bandwidth partitioning, in the
>>> absence
>>> of contention for bandwidth, the minimum bandwidth setting can affect the
>>> amount of achieved bandwidth. Specifically, the achieved bandwidth in the
>>> absence of contention can settle to any value between the values of
>>> MPAMCFG_MBW_MIN and MPAMCFG_MBW_MAX.  Also, if MPAMCFG_MBW_MIN is set
>>> zero (below 0.78125%), once a core enters a throttled state, it will
>>> never
>>> leave that state.
>>>
>>> The first issue is not a concern if the MPAM software allows to program
>>> MPAMCFG_MBW_MIN through the sysfs interface. This patch ensures program
>>> MBW_MIN=1 (0.78125%) whenever MPAMCFG_MBW_MIN=0 is programmed.
>>
>> When MBW_MIN=1, min mem bw can be very low when contention. This may
>> drop mem access performance. Is it possible to set MBW_MIN bigger so
>> that ensure the floor of mem access is high?
>
> Isn't that a policy decision rather than something we should be putting
> in a quirk framework?

MBW_MIN is 1% or 5% less than MBW_MAX.

The lower MBW_MIN hints hardware to lower mem bandwidth when mem access
contention. That causes memory performance degradation.

Is it possible to do the following changes to fix the performance issue?
1. By default min mbw is equal to max mbw. So hardware won't lower
performance unless it's needed. This can fix the current performance issue.
2. Add a new schemata line (e.g. MBI:<id>=x;<id>=y;...) to specify min
mbw just like max mbw specified by schemata line "MB:...". User can use
this line to change min mbw per partition per node. This could be added
in the future.

Thanks.

-Fenghua