rcu-tasks: Convert sleeps to idle priority
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 7 May 2020 23:47:13 +0000 (16:47 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 19:00:22 +0000 (12:00 -0700)
This commit converts the long-standing schedule_timeout_interruptible()
and schedule_timeout_uninterruptible() calls used by the various Tasks
RCU's grace-period kthreads to schedule_timeout_idle().  This conversion
avoids polluting the load-average with Tasks-RCU-related sleeping.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tasks.h

index ce23f6cc5043ce8be2c9087fbf9ed659b15e3efa..91fee8122acd43972e597ce94606f5d20f4ace4b 100644 (file)
@@ -205,7 +205,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
                        if (!rtp->cbs_head) {
                                WARN_ON(signal_pending(current));
                                set_tasks_gp_state(rtp, RTGS_WAIT_WAIT_CBS);
-                               schedule_timeout_interruptible(HZ/10);
+                               schedule_timeout_idle(HZ/10);
                        }
                        continue;
                }
@@ -227,7 +227,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
                        cond_resched();
                }
                /* Paranoid sleep to keep this from entering a tight loop */
-               schedule_timeout_uninterruptible(HZ/10);
+               schedule_timeout_idle(HZ/10);
 
                set_tasks_gp_state(rtp, RTGS_WAIT_CBS);
        }
@@ -336,7 +336,7 @@ static void rcu_tasks_wait_gp(struct rcu_tasks *rtp)
 
                /* Slowly back off waiting for holdouts */
                set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS);
-               schedule_timeout_interruptible(HZ/fract);
+               schedule_timeout_idle(HZ/fract);
 
                if (fract > 1)
                        fract--;