]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Prevent rcu_barrier() from starting needless grace periods
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 10 Apr 2017 22:40:35 +0000 (15:40 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:22 +0000 (08:25 -0700)
commit43b199c86abba923b06dd59a78d1eb5cfb3de96c
tree95d64d71c63d840d31bef62793ce8262305a6f1e
parentffa60bfe6d89af5b3d5e96aad42d319910754459
rcu: Prevent rcu_barrier() from starting needless grace periods

Currently rcu_barrier() uses call_rcu() to enqueue new callbacks
on each CPU with a non-empty callback list.  This works, but means
that rcu_barrier() forces grace periods that are not otherwise needed.
The key point is that rcu_barrier() never needs to wait for a grace
period, but instead only for all pre-existing callbacks to be invoked.
This means that rcu_barrier()'s new callbacks should be placed in
the callback-list segment containing the last pre-existing callback.

This commit makes this change using the new rcu_segcblist_entrain()
function.

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