Webinar On Demand
Unraveling RCU-Usage Mysteries (Fundamentals)
Recorded December 7, 2021
RCU’s little secret is that it is conceptually dead simple.
It has two core conceptual components. The first is a mechanism for publishing and subscribing to pointers using rcu_assign_pointer() and rcu_dereference(), respectively. The second is a way to wait for pre-existing readers, where synchronize_rcu() does the waiting and rcu_read_lock() and rcu_read_unlock() mark the beginnings and ends of those readers.
A common reaction to this description of RCU is “But what on earth can anyone possibly do with -that-?” And indeed, the real difficulty with RCU is that using it effectively requires that you think differently about your problem. That is, there is a significant gap between the functionality provided by the core RCU API and recognizable use cases.
This talk discusses these two RCU components and shows how they can be combined with other mechanisms in bridging the gap to something resembling a reader-writer lock. Time permitting, this talk will also cover the use of RCU to implement a phased state change, thus bridging a much smaller gap to a much less common use case.
A later talk (scheduled for February) will bridge the gap between RCU’s two core components and a number of additional use cases.