diff options
| author | Oleg Nesterov <oleg@tv-sign.ru> | 2005-01-04 05:30:36 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:30:36 -0800 |
| commit | a48d69a5c734ceedc04d351f394d428e032ca4b9 (patch) | |
| tree | 3cb7fdcb8ec4c9b299c3c2537f35d03b010c7b70 /include/linux/init_task.h | |
| parent | 38f808dd88a2128483e0308e93cd4d2d2b7b5023 (diff) | |
[PATCH] rcu: eliminate rcu_ctrlblk.lock
rcu_ctrlblk.lock is used to read the ->cur and ->next_pending
atomically in __rcu_process_callbacks(). It can be replaced
by a couple of memory barriers.
rcu_start_batch:
rcp->next_pending = 0;
smp_wmb();
rcp->cur++;
__rcu_process_callbacks:
rdp->batch = rcp->cur + 1;
smp_rmb();
if (!rcp->next_pending)
rcu_start_batch(rcp, rsp, 1);
This way, if __rcu_process_callbacks() sees incremented ->cur value,
it must also see that ->next_pending == 0 (or rcu_start_batch() is
already in progress on another cpu).
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/init_task.h')
0 files changed, 0 insertions, 0 deletions
