smp_mb__afte..._read_unlock(9)
π smp_mb__after_srcu_read_unlock(9) β NAME π
okay so bestie, this is the page for smp_mb__after_srcu_read_unlock β and yes, it lives in the Kernel API Manual (the header up top literally gets cut off to smp_mb__afte..._read_unlock(9) because the terminal ran out of room π icon behaviour honestly).
What does it do? It ensures full ordering after srcu_read_unlock. That's the whole vibe check. π
β¨ SYNOPSIS β¨
void smp_mb__after_srcu_read_unlock (void );
π«Ά ARGUMENTS π«Ά
voidβ no arguments. none. zero. it takes nothing. it just shows up, does the barrier, and leaves π
πΈ DESCRIPTION πΈ
So here's the tea β: this function converts the preceding srcu_read_unlock into a two-way memory barrier. That's it. That's the whole function. Lowkey iconic.
Call this after srcu_read_unlock, and it guarantees that all memory operations that occur after smp_mb__after_srcu_read_unlock will appear to happen after the preceding srcu_read_unlock. Like, the CPU is not gonna reorder your stuff behind your back, periodt πβ¨
ordering flirting: the unlock comes first, the barrier makes sure nobody sneaks past it β the memory ordering is literally not beating the allegations π¦
π SEE ALSO π
Kernel file ./include/linux/srcu.h β home of all this goodness:
get_completed_synchronize_srcu(9)same_state_synchronize_srcu(9)srcu_read_lock_held(9)srcu_dereference_check(9)srcu_dereference(9)srcu_dereference_notrace(9)srcu_read_lock(9)srcu_read_lock_fast(9)srcu_read_lock_fast_updown(9)srcu_down_read_fast(9)srcu_read_lock_nmisafe(9)srcu_down_read(9)srcu_read_unlock(9)srcu_read_unlock_fast(9)srcu_read_unlock_fast_updown(9)srcu_up_read_fast(9)srcu_read_unlock_nmisafe(9)srcu_up_read(9)smp_mb__after_srcu_read_lock(9)
that's the whole friend group right there, go say hi π§π
β¨ bye bestie β¨ β this page came from the ./include/linux corner of the source tree, dated October 2026, and the footer still spells the name smp_mb__afte..._read_unlock(9) because truncation is forever ππ
go forth and be memory-ordered π
π¦ 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