mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-03 10:10:33 +02:00 
			
		
		
		
	workqueue: Restrict kworker in the offline CPU pool running on housekeeping CPUs
When a CPU is going offline, all workers on the CPU's pool will have their cpus_allowed cleared to cpu_possible_mask and can run on any CPUs including the isolated ones. Instead, set cpus_allowed to wq_unbound_cpumask so that the can avoid isolated CPUs. Signed-off-by: Zqiang <qiang1.zhang@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
							parent
							
								
									59f0c2447e
								
							
						
					
					
						commit
						10a5a651e3
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -5001,7 +5001,7 @@ static void unbind_workers(int cpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for_each_pool_worker(worker, pool) {
 | 
							for_each_pool_worker(worker, pool) {
 | 
				
			||||||
			kthread_set_per_cpu(worker->task, -1);
 | 
								kthread_set_per_cpu(worker->task, -1);
 | 
				
			||||||
			WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
 | 
								WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		mutex_unlock(&wq_pool_attach_mutex);
 | 
							mutex_unlock(&wq_pool_attach_mutex);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue