mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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]
This commit is contained in:
1 parent
f2469a1fb4
commit
06249738a4
1 file changed
+4
@@ -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);
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user