rcu classic: simplify the next pending batch
authorLai Jiangshan <laijs@cn.fujitsu.com>
Sun, 6 Jul 2008 09:23:55 +0000 (17:23 +0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Jul 2008 14:07:32 +0000 (16:07 +0200)
commit3cac97cbb14aed00d83eb33d4613b0fe3aaea863
treeba775ff62be34c2a7c17149516509d6c7d70f4d5
parent5b664cb235e97afbf34db9c4d77f08ebd725335e
rcu classic: simplify the next pending batch

use a batch number(rcp->pending) instead of a flag(rcp->next_pending)

rcu_start_batch() need to change this flag, so mb()s is needed
for memory-access safe.

but(after this patch applied) rcu_start_batch() do not change
this batch number(rcp->pending), rcp->pending is managed by
__rcu_process_callbacks only, and troublesome mb()s are eliminated.

And codes look simpler and clearer.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Gautham Shenoy <ego@in.ibm.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/rcuclassic.h
kernel/rcuclassic.c