mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
workqueue: Drop unnecessary kick_pool() in create_worker()
After creating a new worker, create_worker() is calling kick_pool() to wake up the new worker task. However, as kick_pool() doesn't do anything if there is no work pending, it also calls wake_up_process() explicitly. There's no reason to call kick_pool() at all. wake_up_process() is enough by itself. Drop the unnecessary kick_pool() call. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
8318d6a636
commit
6a229b0e2f
@ -2217,12 +2217,11 @@ static struct worker *create_worker(struct worker_pool *pool)
|
||||
|
||||
worker->pool->nr_workers++;
|
||||
worker_enter_idle(worker);
|
||||
kick_pool(pool);
|
||||
|
||||
/*
|
||||
* @worker is waiting on a completion in kthread() and will trigger hung
|
||||
* check if not woken up soon. As kick_pool() might not have waken it
|
||||
* up, wake it up explicitly once more.
|
||||
* check if not woken up soon. As kick_pool() is noop if @pool is empty,
|
||||
* wake it up explicitly.
|
||||
*/
|
||||
wake_up_process(worker->task);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user