]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rcu: Make synchronize_rcu_mult() check for duplicates
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 28 Apr 2017 23:19:07 +0000 (16:19 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:39 +0000 (08:25 -0700)
commit68ab0b4263224157f4d0c0e42854169a183d7534
tree5c7d1ec59c1561162bcac35df50a7c34701cd4a2
parenta602538e46c9c62e75f1f0be9806495c79bcda9f
rcu: Make synchronize_rcu_mult() check for duplicates

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: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/update.c