• L
    rcu: Flip ->completed only once per SRCU grace period · 944ce9af
    Lai Jiangshan 提交于
    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: NLai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    944ce9af
srcu.c 14.5 KB