Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5a94a61 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Tejun Heo
Browse files

workqueue: Use TASK_IDLE



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:

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

use it.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 9a261491
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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