Skip to content

Commit 8c14263

Browse files
committed
rcu: React to callback overload by boosting RCU readers
RCU priority boosting currently is not applied until the grace period is at least 250 milliseconds old (or the number of milliseconds specified by the CONFIG_RCU_BOOST_DELAY Kconfig option). Although this has worked well, it can result in OOM under conditions of RCU callback flooding. One can argue that the real-time systems using RCU priority boosting should carefully avoid RCU callback flooding, but one can just as well argue that an OOM is a rather obnoxious error message. This commit therefore disables the RCU priority boosting delay when there are excessive numbers of callbacks queued. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent b2b00dd commit 8c14263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
10791079
(rnp->gp_tasks != NULL &&
10801080
rnp->boost_tasks == NULL &&
10811081
rnp->qsmask == 0 &&
1082-
ULONG_CMP_GE(jiffies, rnp->boost_time))) {
1082+
(ULONG_CMP_GE(jiffies, rnp->boost_time) || rcu_state.cbovld))) {
10831083
if (rnp->exp_tasks == NULL)
10841084
rnp->boost_tasks = rnp->gp_tasks;
10851085
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);

0 commit comments

Comments
 (0)