summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
commitb15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch)
tree1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch
parentAdding upstream version 5.10.209. (diff)
downloadlinux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz
linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip
Adding debian version 5.10.209-2.debian/5.10.209-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch')
-rw-r--r--debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch b/debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch
new file mode 100644
index 000000000..2c85d9dd0
--- /dev/null
+++ b/debian/patches-rt/0072-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch
@@ -0,0 +1,66 @@
+From 8cc685c333f0deef6d724211a7f0ff37648d24c7 Mon Sep 17 00:00:00 2001
+From: Scott Wood <swood@redhat.com>
+Date: Tue, 15 Dec 2020 15:16:46 +0100
+Subject: [PATCH 072/323] rcu: Unconditionally use rcuc threads on PREEMPT_RT
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+
+PREEMPT_RT systems have long used the rcutree.use_softirq kernel
+boot parameter to avoid use of RCU_SOFTIRQ handlers, which can disrupt
+real-time applications by invoking callbacks during return from interrupts
+that arrived while executing time-critical code. This kernel boot
+parameter instead runs RCU core processing in an 'rcuc' kthread, thus
+allowing the scheduler to do its job of avoiding disrupting time-critical
+code.
+
+This commit therefore disables the rcutree.use_softirq kernel boot
+parameter on PREEMPT_RT systems, thus forcing such systems to do RCU
+core processing in 'rcuc' kthreads. This approach has long been in
+use by users of the -rt patchset, and there have been no complaints.
+There is therefore no way for the system administrator to override this
+choice, at least without modifying and rebuilding the kernel.
+
+Signed-off-by: Scott Wood <swood@redhat.com>
+[bigeasy: Reword commit message]
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+[ paulmck: Update kernel-parameters.txt accordingly. ]
+Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ Documentation/admin-guide/kernel-parameters.txt | 4 ++++
+ kernel/rcu/tree.c | 4 +++-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
+index f1f7c068cf65..c2afb3304825 100644
+--- a/Documentation/admin-guide/kernel-parameters.txt
++++ b/Documentation/admin-guide/kernel-parameters.txt
+@@ -4191,6 +4191,10 @@
+ value, meaning that RCU_SOFTIRQ is used by default.
+ Specify rcutree.use_softirq=0 to use rcuc kthreads.
+
++ But note that CONFIG_PREEMPT_RT=y kernels disable
++ this kernel boot parameter, forcibly setting it
++ to zero.
++
+ rcutree.rcu_fanout_exact= [KNL]
+ Disable autobalancing of the rcu_node combining
+ tree. This is used by rcutorture, and might
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
+index 06bfe61d3cd3..39b3b56ad92d 100644
+--- a/kernel/rcu/tree.c
++++ b/kernel/rcu/tree.c
+@@ -101,8 +101,10 @@ static struct rcu_state rcu_state = {
+ static bool dump_tree;
+ module_param(dump_tree, bool, 0444);
+ /* By default, use RCU_SOFTIRQ instead of rcuc kthreads. */
+-static bool use_softirq = true;
++static bool use_softirq = !IS_ENABLED(CONFIG_PREEMPT_RT);
++#ifndef CONFIG_PREEMPT_RT
+ module_param(use_softirq, bool, 0444);
++#endif
+ /* Control rcu_node-tree auto-balancing at boot time. */
+ static bool rcu_fanout_exact;
+ module_param(rcu_fanout_exact, bool, 0444);
+--
+2.43.0
+