[RFC PATCH v2 03/10] arm_mpam: resctrl: Do not fail CPU online when domain setup fails

Reinette Chatre reinette.chatre at intel.com
Tue Nov 3 16:50:52 PST 2026


Hi Ben,

On 11/3/26 7:38 AM, Ben Horgan wrote:
> On 19/10/2026 23:07, Reinette Chatre wrote:

...

>> diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
>> index b07e5dd895dd..dc442851fd7e 100644
>> --- a/drivers/resctrl/mpam_resctrl.c
>> +++ b/drivers/resctrl/mpam_resctrl.c
>> @@ -1615,8 +1615,8 @@ static struct mpam_component *find_component(struct mpam_class *class, int cpu)
>>  	return NULL;
>>  }
>>  
>> -static struct mpam_resctrl_dom *
>> -mpam_resctrl_alloc_domain(unsigned int cpu, struct mpam_resctrl_res *res)
>> +static void mpam_resctrl_alloc_domain(unsigned int cpu,
>> +				      struct mpam_resctrl_res *res)
>>  {
>>  	int err;
>>  	struct mpam_resctrl_dom *dom;
>> @@ -1631,11 +1631,11 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mpam_resctrl_res *res)
>>  	comp = find_component(class, cpu);
>>  	/* class has no component for this CPU */
>>  	if (WARN_ON_ONCE(!comp))
>> -		return ERR_PTR(-EINVAL);
>> +		return;
>>  
>>  	dom = kzalloc_node(sizeof(*dom), GFP_KERNEL, cpu_to_node(cpu));
>>  	if (!dom)
>> -		return ERR_PTR(-ENOMEM);
>> +		return;
> 
> Do you think a warning is warranted here?

Sure. I'll add a warning here in the next version, propagated in later patches
to mpam_resctrl_add_cpu_ctrl_domain() and mpam_resctrl_add_cpu_mon_domain().

> 
>>  
>>  	if (r->alloc_capable) {
>>  		dom->ctrl_comp = comp;
>> @@ -1678,7 +1678,6 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mpam_resctrl_res *res)
>>  		}
>>  		if (!any_mon_comp) {
>>  			WARN_ON_ONCE(0);
> 
> I think you could fold in your patch 7 here.
> arm_mpam: resctrl: Warn when no monitoring component is found for a CPU
Will do.

Reinette




More information about the linux-arm-kernel mailing list