]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
workqueue: Use TASK_IDLE
authorPeter Zijlstra <peterz@infradead.org>
Wed, 23 Aug 2017 11:58:44 +0000 (13:58 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 23 Aug 2017 13:30:35 +0000 (06:30 -0700)
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>
kernel/workqueue.c

index 4fa6c7650f095d5e0025ef125d11643bf218ef7f..2d278b9a5469c56ca4c01efadaf27980d1cd1534 100644 (file)
@@ -2247,7 +2247,7 @@ sleep:
         * 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