[PATCH 14/33] cpuset: Update HK_TYPE_DOMAIN cpumask from cpuset

Frederic Weisbecker frederic at kernel.org
Wed Dec 31 06:21:56 PST 2025


Le Fri, Dec 26, 2025 at 04:08:04PM +0800, Chen Ridong a écrit :
> > +int housekeeping_update(struct cpumask *isol_mask, enum hk_type type)
> > +{
> > +	struct cpumask *trial, *old = NULL;
> > +
> > +	if (type != HK_TYPE_DOMAIN)
> > +		return -ENOTSUPP;
> > +
> 
> Nit:
> 
> The current if statement indicates that we only support modifying the cpumask for HK_TYPE_DOMAIN,
> which makes the type argument seem unnecessary. This seems to be designed for better scalability.
> However, when a new type needs to be supported in the future, this statement would have to be
> removed. Also, the use of cpumask_andnot below is not a general operation.
> 
> Anyway, looks good to me.

Ok, let's remove the parameter for now.

> > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > index 475bdab3b8db..653e898a996a 100644
> > --- a/kernel/sched/sched.h
> > +++ b/kernel/sched/sched.h
> > @@ -30,6 +30,7 @@
> >  #include <linux/context_tracking.h>
> >  #include <linux/cpufreq.h>
> >  #include <linux/cpumask_api.h>
> > +#include <linux/cpuset.h>
> >  #include <linux/ctype.h>
> >  #include <linux/file.h>
> >  #include <linux/fs_api.h>
> 
> Reviewed-by: Chen Ridong <chenridong at huawei.com>

Thanks!

-- 
Frederic Weisbecker
SUSE Labs



More information about the linux-arm-kernel mailing list