]> git.karo-electronics.de Git - linux-beck.git/commit
rcu: Rework synchronize_sched_expedited() counter handling
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 24 Jun 2015 17:46:30 +0000 (10:46 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 17 Jul 2015 21:58:47 +0000 (14:58 -0700)
commitd6ada2cf2f81dab8a231d0ef8fb5dec4f5ac8379
tree8c238875b70f7a146dc231d8e2915d17be26a108
parentc190c3b16c0f56ff338df12df53c03859155951b
rcu: Rework synchronize_sched_expedited() counter handling

Now that synchronize_sched_expedited() have a mutex, it can use simpler
work-already-done detection scheme.  This commit simplifies this scheme
by using something similar to the sequence-locking counter scheme.
A counter is incremented before and after each grace period, so that
the counter is odd in the midst of the grace period and even otherwise.
So if the counter has advanced to the second even number that is
greater than or equal to the snapshot, the required grace period has
already happened.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_trace.c