mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
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: 80ed87c8a9ca ("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>
This commit is contained in:
parent
9a2614916a
commit
c5a94a618e
@ -2247,7 +2247,7 @@ sleep:
|
|||||||
* event.
|
* event.
|
||||||
*/
|
*/
|
||||||
worker_enter_idle(worker);
|
worker_enter_idle(worker);
|
||||||
__set_current_state(TASK_INTERRUPTIBLE);
|
__set_current_state(TASK_IDLE);
|
||||||
spin_unlock_irq(&pool->lock);
|
spin_unlock_irq(&pool->lock);
|
||||||
schedule();
|
schedule();
|
||||||
goto woke_up;
|
goto woke_up;
|
||||||
@ -2289,7 +2289,7 @@ static int rescuer_thread(void *__rescuer)
|
|||||||
*/
|
*/
|
||||||
rescuer->task->flags |= PF_WQ_WORKER;
|
rescuer->task->flags |= PF_WQ_WORKER;
|
||||||
repeat:
|
repeat:
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
set_current_state(TASK_IDLE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By the time the rescuer is requested to stop, the workqueue
|
* By the time the rescuer is requested to stop, the workqueue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user