]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
rcu: Abstract the dynticks momentary-idle operation
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 2 Nov 2016 20:33:57 +0000 (13:33 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 16 Jan 2017 22:59:54 +0000 (14:59 -0800)
commit6563de9d6f1336157c9861bcd9864e0b47d65f9d
treea7bcbcf895f02a1a5b488c6a91ac5b5a2e95033b
parent52d7e48b86fc108e45a656d8e53e4237993c481d
rcu: Abstract the dynticks momentary-idle operation

This commit is the first step towards full abstraction of all accesses to
the ->dynticks counter, implementing the previously open-coded atomic add
of two in a new rcu_dynticks_momentary_idle() function.  This abstraction
will ease changes to the ->dynticks counter operation.

Note that this commit gets rid of the smp_mb__before_atomic() and the
smp_mb__after_atomic() calls that were previously present.  The reason
that this is OK from a memory-ordering perspective is that the atomic
operation is now atomic_add_return(), which, as a value-returning atomic,
guarantees full ordering.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/rcu/tree.c