srcu: Reduce scans of srcu_data in counter wrap check
authorIldar Ismagilov <devix84@gmail.com>
Wed, 31 Jan 2018 19:42:21 +0000 (22:42 +0300)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 21 Feb 2018 00:21:12 +0000 (16:21 -0800)
commit8ddbd8832d25463a996a1075c35f312fb43c86b1
tree3b4c1380ccb51276bc068f7865f2072542d9db50
parenta35d13ec3686612b17771bf1abcad75d2ebd42ef
srcu: Reduce scans of srcu_data in counter wrap check

Currently, given a multi-level srcu_node tree, SRCU can scan the full
set of srcu_data structures at each level when cleaning up after a grace
period.  This, though harmless otherwise, represents pointless overhead.
This commit therefore eliminates this overhead by scanning the srcu_data
structures only when traversing the leaf srcu_node structures.

Signed-off-by: Ildar Ismagilov <devix84@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/srcutree.c