The Journey to RCU



Read Copy Update HOWTO


What is RCU?
What is RCU? – “Read, Copy, Update”
A Tour Through RCU’s Requirements

Classic RCU

commit c17ef45342cc033fdf7bdd5b28615e0090f8d2e7
Author: Paul E. McKenney
Date: Tue Jun 23 17:12:47 2009 -0700
rcu: Remove Classic RCU
Brief Overview of Classic RCU Implementation
Linux2.6.11版本:classic RCU的实现

Grace period

URCU: any period of time during which each reader thread resides in at least one quiescent state is called a grace period.
Start a New Grace Period
… after each CPU has passed through at least one quiescent state, the RCU grace period ends.

Quiescent state

… after all the CPUs in the system have gone through at least one “quiescent” state (such as context switch, idle loop, or user code)
URCU: Any line of code not in an RCU read-side critical section is termed a quiescent state
The rcu and rcu_bh flavors of RCU have different sets of quiescent states.

granularity of waiting

The great advantage of RCU … without having to explicitly track each and every one of them
In RCU’s case, the things waited on are called “RCU read-side critical sections”. ditto.

Preemptiable RCU

The 1st: Read-copy-update for realtime Papper
The design of preemptible read-copy-update
The RCU implementation for the -rt patchset is unusual in that it permits read-side critical sections to be preempted and to be blocked waiting for locks. However, it does not handle general blocking (for example, via the wait_event() primitive): if you need that, you should instead use SRCU.
Realtime RCU


Sleepable RCU

Tasks RCU

The RCU-tasks subsystem

RCU: The Bloatwatch Edition

RCU: The Bloatwatch Edition

Hierarchical RCU / Tree RCU

Hierarchical RCU
Tree RCU Grace Period Memory Ordering Components
A Tour Through TREE_RCU’s Data Structures

Priority-Boosting RCU

Priority-Boosting RCU Read-Side Critical Sections


RCU part 3: the RCU API, 2008 edition
The RCU API, 2010 Edition
The RCU API, 2014 Edition
The RCU API, 2019 edition

RCU stalls

Decoding Those Inscrutable RCU CPU Stall Warnings