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
2642 raw_spin_unlock_rcu_node(rnp);2642 raw_spin_unlock_rcu_node(rnp);
2643}2643}
2644 2644
2645/*2645/* Helper function for call_rcu() and friends. */
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 */
2651static void2646static void
2652__call_rcu(struct rcu_head *head, rcu_callback_t func)2647__call_rcu(struct rcu_head *head, rcu_callback_t func)
2653{2648{
@@ -2688,7 +2683,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func) · 34 unmodified lines
2688 check_cb_ovld(rdp);2683 check_cb_ovld(rdp);
2689 if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags))2684 if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags))
2690 return; // Enqueued onto ->nocb_bypass, so just leave.2685 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.
2692 rcu_segcblist_enqueue(&rdp->cblist, head);2687 rcu_segcblist_enqueue(&rdp->cblist, head);
2693 if (__is_kfree_rcu_offset((unsigned long)func))2688 if (__is_kfree_rcu_offset((unsigned long)func))
2694 trace_rcu_kfree_callback(rcu_state.name, head,2689 trace_rcu_kfree_callback(rcu_state.name, head,