rcu: Flip ->completed only once per SRCU grace period
authorLai Jiangshan <laijs@cn.fujitsu.com>
Thu, 23 Feb 2012 00:43:55 +0000 (16:43 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 30 Apr 2012 17:48:21 +0000 (10:48 -0700)
commit944ce9af4767ca085d465e4add69df11a8faa9ef
tree2d2f695f15affe404efb1c0646e6d31ece677d62
parent440253c17fc4ed41d778492a7fb44dc0d756eccc
rcu: Flip ->completed only once per SRCU grace period

This is an optimization of the SRCU grace period.  To guard against
preempted readers with old values of the counter, it suffices to scan the
old counters once more, then flip ->completed only one time.  The reason
this works is that the old readers must have incremented the old set of
counters (if they have not yet incremented, then their critical section
starts after this grace period, so they may be safely ignored).

This commit therefore optimizes the second flip out in favor of a simple
rescan.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/srcu.c
This page took 0.025105 seconds and 5 git commands to generate.