Re: [PATCH 1/4] workqueue: Make wq_affn_dfl_set() use wq_online_cpumask

From: Tejun Heo
Date: Tue Aug 13 2024 - 15:40:56 EST


Hello,

On Thu, Aug 08, 2024 at 12:23:32PM +0800, Lai Jiangshan wrote:
> > @@ -6909,18 +6909,16 @@ static int wq_affn_dfl_set(const char *val, const struct kernel_param *kp)
> > if (affn == WQ_AFFN_DFL)
> > return -EINVAL;
> >
> > - cpus_read_lock();
> > mutex_lock(&wq_pool_mutex);
> >
> > wq_affn_dfl = affn;
> >
> > list_for_each_entry(wq, &workqueues, list) {
> > - for_each_online_cpu(cpu)
> > + for_each_cpu(cpu, wq_online_cpumask)
> > unbound_wq_update_pwq(wq, cpu);
> > }
>
> I think it should be for_each_possible_cpu() for updating the pwqs.

Can you send a patch?

Thanks.

--
tejun