• Tejun Heo's avatar
    percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation · a2f5630c
    Tejun Heo authored
    At the beginning, percpu_ref guaranteed a RCU grace period between a
    call to percpu_ref_kill_and_confirm() and the invocation of the
    confirmation callback.  This guarantee exposed internal implementation
    details and got rescinded while switching over to sched RCU; however,
    __percpu_ref_switch_to_atomic() still inserts a full sched RCU grace
    period even when it can simply wait for the previous attempt.
    
    Remove the unnecessary grace period and perform the confirmation
    synchronously for staggered atomic switching attempts.  Update
    comments accordingly.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    a2f5630c
percpu-refcount.c 11 KB