]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rcu: Prevent force_quiescent_state() memory contention
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 27 Jun 2012 00:00:35 +0000 (17:00 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 5 Sep 2012 18:58:45 +0000 (11:58 -0700)
commit9d6cfe37c9804ac7c9718ab5dc1de3ef4c74aa5e
tree8407e08e20939de775693dd694129804a425d656
parent0441e299e0ccca1322c0d52454c221f831b86cf0
rcu: Prevent force_quiescent_state() memory contention

Large systems running RCU_FAST_NO_HZ kernels see extreme memory
contention on the rcu_state structure's ->fqslock field.  This
can be avoided by disabling RCU_FAST_NO_HZ, either at compile time
or at boot time (via the nohz kernel boot parameter), but large
systems will no doubt become sensitive to energy consumption.
This commit therefore uses a combining-tree approach to spread the
memory contention across new cache lines in the leaf rcu_node structures.
This can be thought of as a tournament lock that has only a try-lock
acquisition primitive.

The effect on small systems is minimal, because such systems have
an rcu_node "tree" consisting of a single node.  In addition, this
functionality is not used on fastpaths.

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