Re: [PATCH v10 02/12] arm,x86,fs/resctrl: Move resctrl_arch_round_mon_val() out of line
From: Chen Yu
Date: Thu Nov 26 2026 - 09:28:16 EST
On Wed, Nov 25, 2026 at 11:01:23AM -0800, Reinette Chatre wrote:
> Hi Chenyu,
>
> On 11/5/26 2:08 AM, Chen Yu wrote:
> > resctrl_arch_round_mon_val() is an inline function in the x86 and MPAM
> > architecture headers. It is only called during resctrl initialization and when
> > user space 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 x86
> > asm header, fragmenting the ERDT code into a 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.
>
> The final paragraph narrates what can be seen from the patch self.
> How about something like:
> In preparation for ERDT support, declare resctrl_arch_round_mon_val() with the
> other architecture interfaces called by resctrl so that resctrl no longer forces
> architectures to implement it inline in a header. Move the x86 and MPAM
> implementations out of their headers.
>
Got it, will adjust it.
> >
> > No functional change.
> >
> > Suggested-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> > Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> > Tested-by: Hongyu Ning <hongyu.ning@xxxxxxxxxxxxxxx>
> > Acked-by: Ben Horgan <ben.horgan@xxxxxxx>
> > ---
>
> With changelog fixed:
> | Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
>
Thanks very much!
Chenyu
> Reinette