rcu_barrier(9)
π rcu_barrier(9) β the Kernel API Manual glow-up π
Okay bestie, so you're in the Kernel API Manual, section 9, and the star of the show is rcu_barrier. Let's get into it β¨
πΈ NAME πΈ
rcu_barrier β wait until all in-flight call_rcu() callbacks complete. That's it, that's the whole vibe. π«Ά
π¦ SYNOPSIS π¦
void rcu_barrier (void );
π ARGUMENTS π
voidβ no arguments. Not one. Zero. Empty set, bestie. π
β¨ DESCRIPTION β¨
Okay so real talk, this is the part where you think it's a full "wait for a whole RCU grace period" situation, and it's not. Note that this primitive does not necessarily wait for an RCU grace period to complete. Like, at all. π
For example, if there are no RCU callbacks queued anywhere in the system, then rcu_barrier is within its rights to return immediately, without waiting for anything, much less an RCU grace period. Literally just yeets itself back to the caller. π In fact, rcu_barrier will normally not result in any RCU grace periods beyond those that were already destined to be executed. So it's not out here creating extra grace periods for fun β it only piggybacks on the ones already on the calendar. ποΈ
Also, quick heads up: in kernels built with CONFIG_RCU_LAZY=y, this function also hurries all pending lazy RCU callbacks. So the lazy ones get a little nudge. Not lazy anymore. Periodt. π₯
π SEE ALSO π
- Kernel file
./kernel/rcu/tree.c rcu_softirq_qs(9)rcu_watching_snap_stopped_since(9)rcu_is_cpu_rrupt_from_idle(9)rcu_irq_exit_check_preempt(9)__rcu_irq_enter_check_tick(9)rcu_is_watching(9)rcu_set_gpwrap_lag(9)call_rcu_hurry(9)call_rcu(9)synchronize_rcu(9)get_completed_synchronize_rcu_full(9)get_state_synchronize_rcu(9)get_state_synchronize_rcu_full(9)start_poll_synchronize_rcu(9)start_poll_synchronize_rcu_full(9)poll_state_synchronize_rcu(9)poll_state_synchronize_rcu_full(9)cond_synchronize_rcu(9)cond_synchronize_rcu_full(9)rcu_barrier_throttled(9)
And that's the whole page, bestie β courtesy of ./kernel/rcu, dated October 2026, filed under rcu_barrier(9). Go forth and barrier responsibly π§π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms