• Paul E. McKenney's avatar
    rcu: Make synchronize_rcu_mult() check for duplicates · 68ab0b42
    Paul E. McKenney authored
    Currently, doing synchronize_rcu_mult(call_rcu, call_rcu) might
    (or might not) wait for two RCU grace periods.  One approach is
    of course "don't do that!", but in CONFIG_PREEMPT=n kernels,
    synchronize_rcu_mult(call_rcu, call_rcu_sched) does exactly that.
    This results in an ugly #ifdef in sched_cpu_deactivate().
    
    This commit therefore makes __wait_rcu_gp() check for duplicates,
    which in turn allows duplicates to be passed to synchronize_rcu_mult()
    without risk of waiting twice on the same type of grace period.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    68ab0b42
update.c 30.1 KB