Re: [PATCH v1 10/31] x86/resctrl: Move monitor init work to a resctrl init call

From: Reinette Chatre
Date: Mon Apr 08 2024 - 23:18:55 EST


Hi James,

On 3/21/2024 9:50 AM, James Morse wrote:

..

> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> index 13c24cb18d76..7a9696f53f2b 100644
> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> @@ -4138,6 +4138,10 @@ int __init resctrl_init(void)
>
> rdtgroup_setup_default();
>
> + ret = resctrl_mon_resource_init();
> + if (ret)
> + return ret;
> +
> ret = sysfs_create_mount_point(fs_kobj, "resctrl");
> if (ret)
> return ret;

Should the mon data be cleaned up if sysfs_create_mount_point() fails?

Reinette