]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rcu: Grace-period-kthread related sleeps to idle priority
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 7 May 2020 22:44:46 +0000 (15:44 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 18:58:49 +0000 (11:58 -0700)
This commit converts the long-standing schedule_timeout_interruptible()
and schedule_timeout_uninterruptible() calls used by RCU's grace-period
kthread to schedule_timeout_idle().  This conversion avoids polluting
the load-average with RCU-related sleeping.

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

index 874c831bcc4556318abc649ccf2343090775519f..feb31c201dee9e5cafd99d131628ec41dc41e809 100644 (file)
@@ -1638,7 +1638,7 @@ static void rcu_gp_slow(int delay)
        if (delay > 0 &&
            !(rcu_seq_ctr(rcu_state.gp_seq) %
              (rcu_num_nodes * PER_RCU_NODE_PERIOD * delay)))
-               schedule_timeout_uninterruptible(delay);
+               schedule_timeout_idle(delay);
 }
 
 static unsigned long sleep_duration;
@@ -1661,7 +1661,7 @@ static void rcu_gp_torture_wait(void)
        duration = xchg(&sleep_duration, 0UL);
        if (duration > 0) {
                pr_alert("%s: Waiting %lu jiffies\n", __func__, duration);
-               schedule_timeout_uninterruptible(duration);
+               schedule_timeout_idle(duration);
                pr_alert("%s: Wait complete\n", __func__);
        }
 }
@@ -2727,7 +2727,7 @@ static void rcu_cpu_kthread(unsigned int cpu)
        }
        *statusp = RCU_KTHREAD_YIELDING;
        trace_rcu_utilization(TPS("Start CPU kthread@rcu_yield"));
-       schedule_timeout_interruptible(2);
+       schedule_timeout_idle(2);
        trace_rcu_utilization(TPS("End CPU kthread@rcu_yield"));
        *statusp = RCU_KTHREAD_WAITING;
 }