diff options
author | Peter Zijlstra <[email protected]> | 2020-09-25 15:45:11 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2020-11-10 18:38:58 +0100 |
commit | 06249738a41a70f2201a148866899f84cbebc45e (patch) | |
tree | 984a912bd2359989bfc427489f0a633b5b8fa579 | |
parent | f2469a1fb43f85d243ce72638367fb6e15c33491 (diff) |
workqueue: Manually break affinity on hotplug
Don't rely on the scheduler to force break affinity for us -- it will
stop doing that for per-cpu-kthreads.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Reviewed-by: Daniel Bristot de Oliveira <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r-- | kernel/workqueue.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 437935e7a199..c71da2a59e12 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4908,6 +4908,10 @@ static void unbind_workers(int cpu) pool->flags |= POOL_DISASSOCIATED; raw_spin_unlock_irq(&pool->lock); + + for_each_pool_worker(worker, pool) + WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_active_mask) < 0); + mutex_unlock(&wq_pool_attach_mutex); /* |