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.

Speaker

Paul E. McKenney , Software Engineer Facebook
Paul E. McKenney is a software engineer at Facebook and has been coding for more than four decades, with more than half of that on parallel hardware. Paul maintains the RCU implementation within the Linux kernel, where the variety of workloads present highly entertaining performance, scalability, real-time response, and energy-efficiency challenges. Paul also is the lead maintainer for the Linux-kernel memory model. Paul previously worked for IBM LTC, Sequent Computer Systems, SRI International, himself, and the Oregon State University Computer Center, with his work having migrated from the upper reaches of the application stack to the lower reaches of the Linux kernel. His hobbies include hiking and gym workouts along with the usual house-wife-and-grown-kids habit.