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

From: Sebastian Andrzej Siewior

Date: Thu Nov 19 2026 - 04:45:59 EST


On 2026-11-16 14:44:36 [-0500], Joel Fernandes wrote:
> --- 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;

What about not deploying the boost thread as suggested in
https://lore.kernel.org/all/20261113163647.OrW62pCV@xxxxxxxxxxxxx/

You would have one condition less to check for. Then it depends if you
want this limited to testing or also allow in production.

Sebastian