[PATCH RFC 2/7] rcutorture: Stop disabling RT throttling for boost testing

From: Joel Fernandes

Date: Wed Nov 11 2026 - 16:40:09 EST


The CPU-hungry-reader boost test depends on RT throttling to bound the
CPU time an unboosted reader can obtain, so there is no longer any
reason to disable it. Remove the code that does so, along with the
now-unneeded sched/sysctl.h include.

Signed-off-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
---
kernel/rcu/rcutorture.c | 29 -----------------------------
1 file changed, 29 deletions(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 2152906a807e..ad980e9257dd 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -43,7 +43,6 @@
#include <linux/torture.h>
#include <linux/vmalloc.h>
#include <linux/sched/debug.h>
-#include <linux/sched/sysctl.h>
#include <linux/oom.h>
#include <linux/tick.h>
#include <linux/rcupdate_trace.h>
@@ -1349,32 +1348,6 @@ static unsigned long rcutorture_seq_diff(unsigned long new, unsigned long old)
* rcu_node would wait for the first one's whole CPU burn.
*/

-static int old_rt_runtime = -1;
-
-static void rcu_torture_disable_rt_throttle(void)
-{
- /*
- * Disable RT throttling so that rcutorture's boost threads don't get
- * throttled. Only possible if rcutorture is built-in otherwise the
- * user should manually do this by setting the sched_rt_period_us and
- * sched_rt_runtime sysctls.
- */
- if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime != -1)
- return;
-
- old_rt_runtime = sysctl_sched_rt_runtime;
- sysctl_sched_rt_runtime = -1;
-}
-
-static void rcu_torture_enable_rt_throttle(void)
-{
- if (!IS_BUILTIN(CONFIG_RCU_TORTURE_TEST) || old_rt_runtime == -1)
- return;
-
- sysctl_sched_rt_runtime = old_rt_runtime;
- old_rt_runtime = -1;
-}
-
struct rcu_torture_boost_reader {
struct completion done;
bool in_cs; // Reader is inside its RCU read-side critical section.
@@ -3422,7 +3395,6 @@ static int rcutorture_booster_cleanup(unsigned int cpu)
mutex_lock(&boost_mutex);
t = boost_tasks[cpu];
boost_tasks[cpu] = NULL;
- rcu_torture_enable_rt_throttle();
mutex_unlock(&boost_mutex);

/* This must be outside of the mutex, otherwise deadlock! */
@@ -3460,7 +3432,6 @@ static int rcutorture_booster_init(unsigned int cpu)

/* Don't allow time recalculation while creating a new task. */
mutex_lock(&boost_mutex);
- rcu_torture_disable_rt_throttle();
VERBOSE_TOROUT_STRING("Creating rcu_torture_boost task");
boost_tasks[cpu] = kthread_run_on_cpu(rcu_torture_boost, NULL,
cpu, "rcu_torture_boost_%u");
--
2.54.0