Thread (8 messages) flat view 8 messages, 3 authors, 12d ago

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

From: Gavin Shan <hidden>
Date: 2026-09-14 06:03:08
Also in: linux-arm-kernel, lkml

On 9/12/26 2:36 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@arm.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
---
Changes since v3:
Parameter order switch (Reinette)
Add Reinette's R-b

Changes since v4:
Add missing tearoff divider, ---
---
  drivers/resctrl/mpam_resctrl.c | 5 +++++
  1 file changed, 5 insertions(+)
Reviewed-by: Gavin Shan <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help