Re: [PATCH v6 1/3] x86,fs/resctrl: Add resctrl_arch_preconvert_bw()
From: Gavin Shan
Date: Mon Sep 14 2026 - 02:02:54 EST
On 9/12/26 2:36 AM, Ben Horgan wrote:
From: Dave Martin <dave.martin@xxxxxxx>Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
On MPAM systems the rounding behaviour of the MBA control would be improved
if the rounding in the fs/resctrl code is removed but this is not the
case for x86. To allow any rounding or conversion of the bandwidth value
provided by the user to be specified by the arch code a new arch hook is
required.
Introduce resctrl_arch_preconvert_bw(), and add its x86 implementation.
This is currently unused in resctrl but when plumbed in it will replace the
call to roundup() in bw_validate().
Signed-off-by: Dave Martin <dave.martin@xxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
---
Changes since Dave's v2:
Split from larger patch and add commit message
Update kernel-doc (Reinette)
Changes since v3:
Swap parameter order (Reinette)
Change summary prefix include fs/resctrl (Reinette)
val -> @val
Add Reinette's R-b
Changes since v4:
Set author to Dave as he wrote the patch
---
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 6 ++++++
include/linux/resctrl.h | 19 +++++++++++++++++++
2 files changed, 25 insertions(+)