summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/EXP-rcu-skip_workqueue.patch
blob: efdfa6417fab10589737ef1d5b0e37e54389420c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Paul E. McKenney <paulmck@linux.ibm.com>
Date: Mon, 29 Oct 2018 11:53:01 +0100
Subject: [PATCH] EXP rcu: skip the workqueue path on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.7-rt5.tar.xz

The function sync_rcu_exp_select_cpus() is only invoked once on boot because
the "force expedite" is not enabled on RT. In that case on RT we have like we
wouldn't have workqueues available so that we don't attempt to schedule them
with disabled preemption.

Suggested-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/rcu/tree_exp.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -441,7 +441,8 @@ static void sync_rcu_exp_select_cpus(smp
 		if (!READ_ONCE(rnp->expmask))
 			continue; /* Avoid early boot non-existent wq. */
 		rnp->rew.rew_func = func;
-		if (!READ_ONCE(rcu_par_gp_wq) ||
+		if (IS_ENABLED(CONFIG_PREEMPT_RT_FULL) ||
+		    !READ_ONCE(rcu_par_gp_wq) ||
 		    rcu_scheduler_active != RCU_SCHEDULER_RUNNING ||
 		    rcu_is_last_leaf_node(rnp)) {
 			/* No workqueues yet or last leaf, do direct call. */