Re: [PATCH 10/10] workqueue: Fix affinity of kworkers when attaching into pool

2020-12-15 Thread Valentin Schneider
On 14/12/20 15:54, Lai Jiangshan wrote: > @@ -1848,11 +1848,11 @@ static void worker_attach_to_pool(struct worker > *worker, > { > mutex_lock(&wq_pool_attach_mutex); > > - /* > - * set_cpus_allowed_ptr() will fail if the cpumask doesn't have any > - * online CPUs. It'll be

[PATCH 10/10] workqueue: Fix affinity of kworkers when attaching into pool

2020-12-14 Thread Lai Jiangshan
From: Lai Jiangshan When worker_attach_to_pool() is called, we should not put the workers to pool->attrs->cpumask when there is not CPU online in it. We have to use wq_online_cpumask in worker_attach_to_pool() to check if pool->attrs->cpumask is valid rather than cpu_online_mask or cpu_active_ma