Skip to content

Commit

Permalink
workqueue: Use TASK_IDLE
Browse files Browse the repository at this point in the history
Workqueues don't use signals, it (ab)uses TASK_INTERRUPTIBLE to avoid
increasing the loadavg numbers. We've 'recently' introduced TASK_IDLE
for this case:

  80ed87c ("sched/wait: Introduce TASK_NOLOAD and TASK_IDLE")

use it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Tejun Heo committed Aug 23, 2017
1 parent 9a26149 commit c5a94a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,7 @@ static int worker_thread(void *__worker)
* event.
*/
worker_enter_idle(worker);
__set_current_state(TASK_INTERRUPTIBLE);
__set_current_state(TASK_IDLE);
spin_unlock_irq(&pool->lock);
schedule();
goto woke_up;
Expand Down Expand Up @@ -2289,7 +2289,7 @@ static int rescuer_thread(void *__rescuer)
*/
rescuer->task->flags |= PF_WQ_WORKER;
repeat:
set_current_state(TASK_INTERRUPTIBLE);
set_current_state(TASK_IDLE);

/*
* By the time the rescuer is requested to stop, the workqueue
Expand Down

0 comments on commit c5a94a6

Please sign in to comment.