[PATCH v3 3/6] rcutorture: Remove unused check_boost_failed hook
From: Joel Fernandes
Date: Sat Nov 21 2026 - 10:36:07 EST
Nothing in rcutorture calls ->check_boost_failed() now that boost
failure is decided by whether the reader finished, so drop the hook
from struct rcu_torture_ops and its initializer.
That also leaves rcu_check_boost_fail() without any callers, so remove
it as well, along with its prototype and its CONFIG_TINY_RCU stub.
[ jfern: Apply feedback from Sebastian to drop stray sysctl.h include ]
[ jfern: Apply feedback from Sebastian to remove rcu_check_boost_fail() ]
Signed-off-by: Joel Fernandes <jfern@xxxxxxxxxx>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Tested-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
kernel/rcu/rcu.h | 2 --
kernel/rcu/rcutorture.c | 2 --
kernel/rcu/tree_stall.h | 57 -----------------------------------------
3 files changed, 61 deletions(-)
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 9f7e60e69275..93542e30b7f4 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -652,7 +652,6 @@ static inline bool rcu_watching_zero_in_eqs(int cpu, int *vp) { return false; }
static inline unsigned long rcu_get_gp_seq(void) { return 0; }
static inline unsigned long rcu_exp_batches_completed(void) { return 0; }
static inline void rcu_force_quiescent_state(void) { }
-static inline bool rcu_check_boost_fail(unsigned long gp_state, int *cpup) { return true; }
static inline void show_rcu_gp_kthreads(void) { }
static inline int rcu_get_gp_kthreads_prio(void) { return 0; }
static inline void rcu_fwd_progress_check(unsigned long j) { }
@@ -662,7 +661,6 @@ static inline void rcu_gp_slow_unregister(atomic_t *rgssp) { }
bool rcu_watching_zero_in_eqs(int cpu, int *vp);
unsigned long rcu_get_gp_seq(void);
unsigned long rcu_exp_batches_completed(void);
-bool rcu_check_boost_fail(unsigned long gp_state, int *cpup);
void show_rcu_gp_kthreads(void);
int rcu_get_gp_kthreads_prio(void);
void rcu_fwd_progress_check(unsigned long j);
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 4ec2c6e1d3ba..ff674ace50a6 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -425,7 +425,6 @@ struct rcu_torture_ops {
void (*fqs)(void);
void (*stats)(void);
void (*gp_kthread_dbg)(void);
- bool (*check_boost_failed)(unsigned long gp_state, int *cpup);
int (*stall_dur)(void);
void (*get_gp_data)(int *flags, unsigned long *gp_seq);
void (*gp_slow_register)(atomic_t *rgssp);
@@ -637,7 +636,6 @@ static struct rcu_torture_ops rcu_ops = {
.cb_barrier = rcu_barrier,
.fqs = rcu_force_quiescent_state,
.gp_kthread_dbg = show_rcu_gp_kthreads,
- .check_boost_failed = rcu_check_boost_fail,
.stall_dur = rcu_jiffies_till_stall_check,
.get_gp_data = rcutorture_get_gp_data,
.gp_slow_register = rcu_gp_slow_register,
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index 08699652f51c..e0607f423564 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -922,63 +922,6 @@ static void check_cpu_stall(struct rcu_data *rdp)
// RCU forward-progress mechanisms, including for callback invocation.
-/*
- * Check to see if a failure to end RCU priority inversion was due to
- * a CPU not passing through a quiescent state. When this happens, there
- * is nothing that RCU priority boosting can do to help, so we shouldn't
- * count this as an RCU priority boosting failure. A return of true says
- * RCU priority boosting is to blame, and false says otherwise. If false
- * is returned, the first of the CPUs to blame is stored through cpup.
- * If there was no CPU blocking the current grace period, but also nothing
- * in need of being boosted, *cpup is set to -1. This can happen in case
- * of vCPU preemption while the last CPU is reporting its quiscent state,
- * for example.
- *
- * If cpup is NULL, then a lockless quick check is carried out, suitable
- * for high-rate usage. On the other hand, if cpup is non-NULL, each
- * rcu_node structure's ->lock is acquired, ruling out high-rate usage.
- */
-bool rcu_check_boost_fail(unsigned long gp_state, int *cpup)
-{
- bool atb = false;
- int cpu;
- unsigned long flags;
- struct rcu_node *rnp;
-
- rcu_for_each_leaf_node(rnp) {
- if (!cpup) {
- if (data_race(READ_ONCE(rnp->qsmask))) {
- return false;
- } else {
- if (READ_ONCE(rnp->gp_tasks))
- atb = true;
- continue;
- }
- }
- *cpup = -1;
- raw_spin_lock_irqsave_rcu_node(rnp, flags);
- if (rnp->gp_tasks)
- atb = true;
- if (!rnp->qsmask) {
- // No CPUs without quiescent states for this rnp.
- raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
- continue;
- }
- // Find the first holdout CPU.
- for_each_leaf_node_possible_cpu(rnp, cpu) {
- if (rnp->qsmask & (1UL << (cpu - rnp->grplo))) {
- raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
- *cpup = cpu;
- return false;
- }
- }
- raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
- }
- // Can't blame CPUs, so must blame RCU priority boosting.
- return atb;
-}
-EXPORT_SYMBOL_GPL(rcu_check_boost_fail);
-
static noinline_for_stack void show_rcu_state(void)
{
unsigned long j;
--
2.54.0