Re: [PATCH v9 06/12] x86,fs/resctrl: Move resctrl_arch_round_mon_val() out of line

From: Reinette Chatre

Date: Fri Oct 23 2026 - 20:12:31 EST


Hi Chenyu,

On 10/13/26 7:59 PM, Chen Yu wrote:
> resctrl_arch_round_mon_val() is an inline function in the architecture
> header. It is only called during resctrl initialization and when user space

For emphasis this can be:
"in the architecture header" -> "in the x86 and MPAM architecture headers."

> writes "max_threshold_occupancy", neither of which is a hot path that
> benefits from inlining.
>
> Upcoming ERDT support needs resctrl_arch_round_mon_val() to consult
> ERDT-specific state. Keeping it inline would force ERDT prototypes into the
> architecture header, fragmenting the ERDT code across files.

For emphasis:
"architecture header" -> "x86 asm header"
"fragmenting the ERDT code into the x86 asm header where it does not belong."?

>
> Move resctrl_arch_round_mon_val() into monitor.c and declare it in
> include/linux/resctrl.h alongside the other resctrl_arch_*() calls. Move the
> MPAM stub from arm_mpam.h into mpam_resctrl.c accordingly.
>
> No functional change.
>
> Suggested-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> ---
>
> arch/x86/include/asm/resctrl.h | 9 ---------
> arch/x86/kernel/cpu/resctrl/monitor.c | 9 +++++++++
> drivers/resctrl/mpam_resctrl.c | 5 +++++
> include/linux/arm_mpam.h | 5 -----

This needs a subject prefix of "arm,x86,fs/resctrl:" to draw attention from
MPAM maintainers.

This needs an ack from the MPAM maintainer and at this time it is really
buried within this series and unlikely to get attention.

Placing this change in the middle of the series also places unnecessary burden
on MPAM maintainers since now they need to review all patches up to this
change when only a review of this change is needed.

Please move this patch to beginning of series, this could be the second
patch in the series after the "x86/topology" change.

> include/linux/resctrl.h | 1 +
> 5 files changed, 15 insertions(+), 14 deletions(-)
Patch looks good.

Reinette