From: Paul E. McKenney Date: Sun, 10 Mar 2013 22:44:52 +0000 (-0700) Subject: rcu: Tone down debugging during boot-up and shutdown. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81e59494a56cb14f559886c345c4a93fb576bbab;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git rcu: Tone down debugging during boot-up and shutdown. In some situations, randomly delaying RCU grace-period initialization can cause more trouble than help. This commit therefore restricts this type of RCU self-torture to runtime, giving it a rest during boot and shutdown. Reported-by: Sasha Levin Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 71df6f9f5ce6..0e522504ae37 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -1319,7 +1319,8 @@ static int rcu_gp_init(struct rcu_state *rsp) rnp->grphi, rnp->qsmask); raw_spin_unlock_irq(&rnp->lock); #ifdef CONFIG_PROVE_RCU_DELAY - if ((random32() % (rcu_num_nodes * 8)) == 0) + if ((random32() % (rcu_num_nodes * 8)) == 0 && + system_state == SYSTEM_RUNNING) schedule_timeout_uninterruptible(2); #endif /* #ifdef CONFIG_PROVE_RCU_DELAY */ cond_resched();