mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	kernel/workqueue: Bind rescuer to unbound cpumask for WQ_UNBOUND
At the time they are created unbound workqueues rescuers currently use cpu_possible_mask as their affinity, but this can be too wide in case a workqueue unbound mask has been set as a subset of cpu_possible_mask. Make new rescuers use their associated workqueue unbound cpumask from the start. Signed-off-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
							parent
							
								
									ab5e5b99a9
								
							
						
					
					
						commit
						85f0ab43f9
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -4652,6 +4652,9 @@ static int init_rescuer(struct workqueue_struct *wq)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wq->rescuer = rescuer;
 | 
						wq->rescuer = rescuer;
 | 
				
			||||||
 | 
						if (wq->flags & WQ_UNBOUND)
 | 
				
			||||||
 | 
							kthread_bind_mask(rescuer->task, wq->unbound_attrs->cpumask);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
		kthread_bind_mask(rescuer->task, cpu_possible_mask);
 | 
							kthread_bind_mask(rescuer->task, cpu_possible_mask);
 | 
				
			||||||
	wake_up_process(rescuer->task);
 | 
						wake_up_process(rescuer->task);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue