image/svg+xml rcu_accelerate_cbs() rcu_prepare_for_idle() rcu_accelerate_cbs() note_gp_changes() rcu_advance_cbs() __note_gp_changes() call_rcu() Wake up grace-period kernel thread rcu_accelerate_cbs() takedown_cpu() rcutree_migrate_callbacks() rcu_advance_cbs() Leaf Leaf Leaf Phase One of Update Root rcu_seq_start(rsp->gp_seq) rcu_gp_init() Leaf Leaf Leaf Leaf End of Last Grace Period Grace-period kernel thread awakened Leaf ->qsmaskinit ->qsmaskinitnext Leaf Leaf Leaf ->qsmaskinit rcu_init_new_rnp() or rcu_cleanup_dead_rnp() (optional) ->qsmaskinit Root ->qsmaskinitnext Root ->gp_seq = rsp->gp_seq ->gp_seq = rsp->gp_seq Leaf ->gp_seq = rsp->gp_seq ->gp_seq = rsp->gp_seq Leaf Leaf ->gp_seq = rsp->gp_seq Leaf ->gp_seq = rsp->gp_seq rcu_gp_fqs() ->qsmask &= ~->grpmask Leaf ->qsmask &= ~->grpmask Leaf Leaf Leaf ->qsmask &= ~->grpmask force_qs_rnp() rcu_watching_snap_save() Root ->qsmask &= ~->grpmask rcu_watching_snap_recheck() ->qsmask &= ~->grpmask RCU read-side critical section ct_kernel_exit_state() atomic_add_return() ct_kernel_enter_state() atomic_add_return() RCU read-side critical section RCU read-side critical section rcutree_report_cpu_dead() rcu_cleanup_dying_idle_cpu() ->qsmaskinitnext Leaf RCU read-side critical section rcutree_report_cpu_starting() ->qsmaskinitnext Leaf ->qsmask &= ~->grpmask Root rcu_report_rnp() Leaf ->qsmask &= ~->grpmask Leaf Leaf Leaf ->qsmask &= ~->grpmask note_gp_changes() rdp->gp_seq __note_gp_changes() Leaf rcu_note_context_switch() rcu_sched_clock_irq() rcu_core() rcu_check_quiescent_state() rcu__report_qs_rdp()) RCU read-side critical section RCU read-side critical section RCU read-side critical section RCU read-side critical section Wake up grace-period kernel thread rcu_report_qs_rsp() Grace-period kernel thread awakened Root rcu_seq_end(&rnp->gp_seq) rcu_gp_cleanup() rcu_seq_end(&rnp->gp_seq) Leaf Root Leaf Leaf Leaf Leaf rcu_seq_end(&rnp->gp_seq) Leaf Leaf rcu_seq_end(&rnp->gp_seq) Leaf rcu_seq_end(&rnp->gp_seq) Start of Next Grace Period rcu_sched_clock_irq() rcu_cleanup_after_idle() rcu_advance_cbs() Leaf __note_gp_changes() Phase Two of Update RCU_SOFTIRQ rcu_do_batch() rcu_seq_end(&rnp->gp_seq) rcu_seq_end(&rnp->gp_seq) rcu_seq_end(&rsp->gp_seq) ->gp_seq = rsp->gp_seq