srcu_down_read_fast(9)
β¨ srcu_down_read_fast β¨
okay so real talk, this is a page from the Kernel API Manual (yes, that Kernel API Manual π ) and it's about one very specific little function. buckle up bestie π
πΈ NAME πΈ
srcu_down_read_fast β register a new reader for an SRCU-protected structure. that's it, that's the whole job, and it does it fast π¦
π«Ά SYNOPSIS π«Ά
struct srcu_ctr __percpu * srcu_down_read_fast (struct srcu_struct *ssp );
like yes, the return type has a space in it before the *, no we are not going to fix it, it's iconic and we respect it π
π ARGUMENTS π
sspβ thesrcu_structwhere you're registering your brand new reader. that's the whole vibe check. that's the parameter. π
π₯ DESCRIPTION π₯
okay so here's the tea: calling this drops you into a semaphore-like SRCU read-side critical section β but specifically for a lightweight smp_mb-free reader. no memory barrier, no heavy lifting, just vibes and correctness β¨
if you want the full lore, go read srcu_read_lock_fast and srcu_down_read, because this page is just the cool younger sibling pointing you at them. iykyk π
and here's the part where you actually have to pay attention, bestie β the same srcu_struct can totally be used concurrently by both srcu_down_read_fast and srcu_read_lock_fast. no cap, that's allowed. π
BUT π the exact same definition/initialization requirements that are called out for srcu_read_lock_fast_updown still apply here. do not skip those. do not skim those. do not "yeah yeah i know" those. they apply. periodt. π
π SEE ALSO π
go be nosy, there's a whole friend group here π«Ά
kernel file ./include/linux/srcu.h plus all of these absolute legends:
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_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_unlock(9)smp_mb__after_srcu_read_lock(9)
and that's the whole page! mwah π this one lives in ./include/linux, stamped October 2026, straight out of the Kernel API Manual β stay hydrated, read your barriers, and go register a reader for me π§π
π¦ 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