History

rcu: Update __call_rcu() comments

The __call_rcu() function's header comment refers to a cpu argument that no longer exists, and the comment of the return path from rcu_nocb_try_bypass() ignores the non-no-CBs CPU case. This commit therefore update both comments.

Paul E. McKenney committed 6 years ago

Commit b692dc41 parent aa96a931 file · +2 −7Browse files

Unified · Split

kernel/rcu/tree.c+2−7
@@ -2642,12 +2642,7 @@ static void check_cb_ovld(struct rcu_data *rdp) · 2641 unmodified lines
26422642 raw_spin_unlock_rcu_node(rnp);
26432643 }
26442644
2645−/*
2646− * Helper function for call_rcu() and friends. The cpu argument will
2647− * normally be -1, indicating "currently running CPU". It may specify
2648− * a CPU only if that CPU is a no-CBs CPU. Currently, only rcu_barrier()
2649− * is expected to specify a CPU.
2650− */
2645+/* Helper function for call_rcu() and friends. */
26512646 static void
26522647 __call_rcu(struct rcu_head *head, rcu_callback_t func)
26532648 {
@@ -2688,7 +2683,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func) · 34 unmodified lines
26882683 check_cb_ovld(rdp);
26892684 if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags))
26902685 return; // Enqueued onto ->nocb_bypass, so just leave.
2691− /* If we get here, rcu_nocb_try_bypass() acquired ->nocb_lock. */
2686+ // If no-CBs CPU gets here, rcu_nocb_try_bypass() acquired ->nocb_lock.
26922687 rcu_segcblist_enqueue(&rdp->cblist, head);
26932688 if (__is_kfree_rcu_offset((unsigned long)func))
26942689 trace_rcu_kfree_callback(rcu_state.name, head,