Skip to content

Commit

Permalink
rcu: Add comment to rcu_do_batch() identifying rcuoc code path
Browse files Browse the repository at this point in the history
This commit adds a comment to help explain why the "else" clause of the
in_serving_softirq() "if" statement does not need to enforce a time limit.
The reason is that this "else" clause handles rcuoc kthreads that do not
block handlers for other softirq vectors.

Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
  • Loading branch information
paulmckrcu authored and joelagnel committed Apr 5, 2023
1 parent 8157369 commit 09853fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,8 @@ static void rcu_do_batch(struct rcu_data *rdp)
break;
}
} else {
// In rcuoc context, so no worries about depriving
// other softirq vectors of CPU cycles.
local_bh_enable();
lockdep_assert_irqs_enabled();
cond_resched_tasks_rcu_qs();
Expand Down

0 comments on commit 09853fb

Please sign in to comment.