Re: [PATCH v4 2/3] arm_mpam: resctrl: Add pass-through resctrl_arch_preconvert_bw()

From: Ben Horgan

Date: Thu Jul 09 2026 - 05:38:34 EST


Hi Reinette,

On 7/7/26 15:51, Reinette Chatre wrote:
> Hi Ben,
>
> On 7/7/26 1:35 AM, Ben Horgan wrote:
>> Hi Reinette,
>>
>> On 7/6/26 22:33, Reinette Chatre wrote:
>>> Hi Ben,
>>>
>>> On 7/6/26 9:06 AM, Ben Horgan wrote:
>>>> resctrl rounds up the percentage value of the MBA based on the bw_gran. As
>>>> MPAM uses a binary fixed point fraction format for MBA rather than a
>>>> decimal percentage, this introduces rounding errors.
>>>>
>>>> Without this additional rounding, if the user reads the value in an MB
>>>> schema and then writes it back to the schema, the value in hardware won't
>>>> change. However, with this additional rounding, this guarantee is broken
>>>> for systems with mbw_wd < 7.
>>>>
>>>> resctrl is introducing resctrl_arch_preconvert_bw() to allow the arch code
>>>> to specify the conversion resctrl does to the user-provided bandwidth
>>>> value. Add the MPAM version of resctrl_arch_preconvert_bw(). This does no
>>>> conversion.
>>>>
>>>> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
>>>> Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
>>>>
>>>
>>> Unfortunately the "---" separator is missing here.
>>
>> Another silly mistake.. sorry about that. I've corrected locally and
>> will send a respin in a day or two.
> No problem.
>
> When you respin, could you please add a snippet to the cover about expectations
> how this series should be merged? This will be the first piece of work that
> touches the x86 and Arm driver as well as resctrl fs code. So far I assumed it
> will go in via tip but I think it will help to state this from Arm side.

Yes, I was assuming that too. I'll make it explicit in the cover letter.

> We still need a plan for if/when the Arm side touches the same code though. Thankfully
> this work is small.

I'm open to whatever works best for you and the others involved.

Thanks,

Ben

>
> Reinette