3 ms·
> EDIT I just re-read - so he's proposing that rather than locking you just prevent a thread from being context-switched by the scheduler. There are multiple i
by JoshTriplett 10y ago
> EDIT I just re-read - so he's proposing that rather than locking you just prevent a thread from being context-switched by the scheduler.
There are multiple implementations of RCU. One of them (the earliest) uses this mechanism. However, Linux also has a fully preemptible implementation of RCU, in which readers do not prevent context switch at all; that implementation tracks grace periods differently, without relying on context switch. (But still without making rcu_read_lock/rcu_read_unlock expensive.)