[PATCH RFC 5/7] rcu: Add rcutree.boost_disable to disable priority boosting at runtime

From: Joel Fernandes

Date: Wed Nov 11 2026 - 16:43:06 EST


CONFIG_RCU_BOOST is now enabled automatically for preemptible RCU and
cannot be turned off, so rcutorture's BUSTED-BOOST scenario, which is
meant to show that rcutorture detects broken priority boosting, can no
longer break it. Add a boot parameter that makes rcu_initiate_boost()
do nothing, giving that scenario a way to break boosting.

Signed-off-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
---
kernel/rcu/tree_plugin.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index ae5d21bae7bc..04a58dd003f4 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1270,6 +1270,9 @@ static int rcu_boost_kthread(void *arg)
return 0;
}

+static bool boost_disable;
+module_param(boost_disable, bool, 0444);
+
/*
* Check to see if it is time to start boosting RCU readers that are
* blocking the current grace period, and, if so, tell the per-rcu_node
@@ -1284,7 +1287,7 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
__releases(rnp->lock)
{
raw_lockdep_assert_held_rcu_node(rnp);
- if (!rnp->boost_kthread_task ||
+ if (boost_disable || !rnp->boost_kthread_task ||
(!rcu_preempt_blocked_readers_cgp(rnp) && !rnp->exp_tasks)) {
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
return;
--
2.54.0