rcu_sync_enter(9)
β¨ rcu_sync_enter(9) β¨
okay so bestie, welcome to the kernel API manual, section 9 β today's main character is rcu_sync_enter, and she's lowkey iconic π
π NAME π
rcu_sync_enter β force readers onto the slowpath. no cap, that's literally the whole job π¦
πΈ SYNOPSIS πΈ
void rcu_sync_enter (struct rcu_sync *rsp );
π ARGUMENTS π
rspβ pointer to thercu_syncstructure you're gonna use for synchronization. that's your girl, she holds the state π«Ά
π₯ DESCRIPTION π₯
So here's the vibe: this function is for updaters β the ones who need readers to actually use the slowpath while an update is going down. the way that works is, once rcu_sync_enter returns, every single subsequent call to rcu_sync_is_idle comes back false, which is basically the kernel telling readers "stay off your fastpaths, we're busy" πβ¨
And then a later call to rcu_sync_exit re-enables those reader fastpaths. balance restored, periodt π
Now the important bit, bestie β pay attention because this is the tea β: when rcu_sync_enter is called in isolation, it must wait for a grace period. that's the rule, no shortcuts. however π β closely spaced calls to rcu_sync_enter can optimize away that grace-period wait via a state machine, and that state machine is implemented by rcu_sync_enter, rcu_sync_exit, and rcu_sync_func. teamwork makes the dream work fr fr π
π SEE ALSO π
- Kernel file
./kernel/rcu/sync.c rcu_sync_init(9)rcu_sync_func(9)rcu_sync_exit(9)rcu_sync_dtor(9)
go read those next, iykyk ππ
and that's a wrap, bestie! π this lil page comes to you from ./kernel/rcu, dated October 2026 β slay, mwah ππΈ
π¦ 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