[PATCH] rcu: Change default RCU kthread priority to 2
From: Joel Fernandes (Google)
Date: Mon Jun 18 2018 - 18:13:10 EST
The current RT priority of 1 for RCU kthreads makes rcutorture's boost test
fail on systems where rcutree.kthread_prio isn't passed.
The rcutorture boost kthreads have the same priority as well (RT priority of
1). Due to this, the rcutorture kthreads starve the RCU subsystem's kthreads
and causes rcutorture failures. This patch changes the priority of the RCU
subsystem's threads to a default RT priority of 2 so that rcutorture's
threads get preempted by them. Verified that the boost tests will pass with
this change.
Reported-by: Xiaolong Ye (via lkp-robot) <xiaolong.ye@xxxxxxxxx>
Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
---
kernel/rcu/tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index deb2508be923..920c39e3f871 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -171,7 +171,7 @@ static void rcu_report_exp_rdp(struct rcu_state *rsp,
static void sync_sched_exp_online_cleanup(int cpu);
/* rcuc/rcub kthread realtime priority */
-static int kthread_prio = IS_ENABLED(CONFIG_RCU_BOOST) ? 1 : 0;
+static int kthread_prio = IS_ENABLED(CONFIG_RCU_BOOST) ? 2 : 0;
module_param(kthread_prio, int, 0644);
/* Delay in jiffies for grace-period initialization delays, debug only. */
--
2.18.0.rc1.244.gcf134e6275-goog