December 8, 2010
This article was contributed by Paul McKenney
This table is part of Paul McKenney's
2010 RCU
API update article
| Attribute |
RCU |
RCU BH |
RCU Sched |
SRCU |
| Purpose |
Wait for RCU read-side critical sections |
Wait for RCU-bh read-side critical sections & irqs |
Wait for RCU-sched read-side critical sections, preempt-disable regions, hardirqs, & NMIs |
Wait for SRCU read-side critical sections, allow sleeping readers |
| Read-side primitives |
rcu_read_lock() rcu_read_unlock() |
rcu_read_lock_bh()
rcu_read_unlock_bh() |
rcu_read_lock_sched()
rcu_read_unlock_sched()
rcu_read_lock_sched_notrace()
rcu_read_unlock_sched_notrace()
preempt_disable()
preempt_enable()
(and friends) |
srcu_read_lock()
srcu_read_unlock() |
Update-side primitives (synchronous) |
synchronize_rcu()
synchronize_net() |
synchronize_rcu_bh() |
synchronize_sched() |
synchronize_srcu() |
Update-side primitives (expedited) |
synchronize_rcu_expedited() |
synchronize_rcu_bh_expedited() |
synchronize_sched_expedited() |
synchronize_srcu_expedited() |
Update-side primitives (asynchronous/callback) |
call_rcu() |
call_rcu_bh() |
call_rcu_sched() |
N/A |
Update-side primitives (wait for callbacks) |
rcu_barrier() |
rcu_barrier_bh() |
rcu_barrier_sched() |
N/A |
| Read side constraints |
No blocking except preemption and
“spinlock” acquisition. |
No BH enabling |
No blocking |
No wait for synchronize_srcu() |
| Read side overhead |
Simple instructions (free on !PREEMPT) |
BH disable/enable |
Preempt disable/enable (free on !PREEMPT) |
Simple instructions, preempt disable/enable |
Asynchronous update-side overhead
(for example, call_rcu()) |
sub-microsecond |
sub-microsecond |
sub-microsecond |
N/A |
| Grace-period latency |
10s of milliseconds |
10s of milliseconds |
10s of milliseconds |
10s of milliseconds |
| !PREEMPT_RT default implementation |
RCU Sched |
RCU BH |
RCU Sched |
SRCU |
| PREEMPT_RT default implementation |
Preemptible RCU |
RCU BH |
RCU Sched |
SRCU |
(
Log in to post comments)