• Frederic Weisbecker's avatar
    rcu/nocb: Re-arrange call_rcu() NOCB specific code · afd4e696
    Frederic Weisbecker authored
    Currently the call_rcu() function interleaves NOCB and !NOCB enqueue
    code in a complicated way such that:
    
    * The bypass enqueue code may or may not have enqueued and may or may
      not have locked the ->nocb_lock. Everything that follows is in a
      Schrödinger locking state for the unwary reviewer's eyes.
    
    * The was_alldone is always set but only used in NOCB related code.
    
    * The NOCB wake up is distantly related to the locking hopefully
      performed by the bypass enqueue code that did not enqueue on the
      bypass list.
    
    Unconfuse the whole and gather NOCB and !NOCB specific enqueue code to
    their own functions.
    Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
    Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
    afd4e696
tree.h 21.2 KB