• Paul E. McKenney's avatar
    rcu: Prevent rcu_barrier() from starting needless grace periods · f92c734f
    Paul E. McKenney authored
    Currently rcu_barrier() uses call_rcu() to enqueue new callbacks
    on each CPU with a non-empty callback list.  This works, but means
    that rcu_barrier() forces grace periods that are not otherwise needed.
    The key point is that rcu_barrier() never needs to wait for a grace
    period, but instead only for all pre-existing callbacks to be invoked.
    This means that rcu_barrier()'s new callbacks should be placed in
    the callback-list segment containing the last pre-existing callback.
    
    This commit makes this change using the new rcu_segcblist_entrain()
    function.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    f92c734f
rcu.h 24.5 KB