Re: [PATCH v11 2/8] x86/resctrl: Prepare for per-CTRL_MON group mba_MBps control

Reinette Chatre
2024-12-10T18:43:28Z

Hi Boris,

On 12/10/24 2:13 AM, Borislav Petkov wrote:
> On Mon, Dec 09, 2024 at 04:00:54PM -0800, Luck, Tony wrote:
>> Reinette is right. The post-split home of this is not <linux/resctrl.h>
>> but fs/resctrl/internal.h which doesn't exist yet.
>>
>> So Boris is right, this declaration should be added to arch/x86/kernel/cpu/resctrl/internal.h
>> by this patch to be moved later.
>
> Done:
>
> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index 485800055a7d..542d01c055aa 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -510,6 +510,7 @@ extern struct mutex rdtgroup_mutex;
> extern struct rdt_hw_resource rdt_resources_all[];
> extern struct rdtgroup rdtgroup_default;
> extern struct dentry *debugfs_resctrl;
> +extern enum resctrl_event_id mba_mbps_default_event;
>
> enum resctrl_res_level {
> RDT_RESOURCE_L3,
> @@ -653,5 +654,4 @@ void resctrl_file_fflags_init(const char *config, unsigned long fflags);
> void rdt_staged_configs_clear(void);
> bool closid_allocated(unsigned int closid);
> int resctrl_find_cleanest_closid(void);
> -
> #endif /* _ASM_X86_RESCTRL_INTERNAL_H */
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
> index fd05b937e2f4..d94abba1c716 100644
> --- a/include/linux/resctrl.h
> +++ b/include/linux/resctrl.h
> @@ -49,8 +49,6 @@ enum resctrl_event_id {
> QOS_L3_MBM_LOCAL_EVENT_ID = 0x03,
> };
>
> -extern enum resctrl_event_id mba_mbps_default_event;
> -
> /**
> * struct resctrl_staged_config - parsed configuration to be applied
> * @new_ctrl: new ctrl value to be loaded
>

Thank you very much for catching the issue and taking the time to create
the fix.

The middle hunk looks to be an unrelated change. I squashed the first and
last hunk of this change into the original patch and all my tests pass.
I am still waiting the 0day test report though.

What would work best for you to have this fix included?

Reinette