cond_synchr...pedited_full(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cond_synchronize_rcu_expedited_full β€” Kernel API Manual ✨

okay bestie, buckle up, because this one is a whole RCU grace period situation and honestly it's giving "wait, but only if you have to" πŸŽ€


✨ NAME ✨

cond_synchronize_rcu_expedited_full β€” conditionally wait for an expedited RCU grace period πŸ¦‹


🌸 SYNOPSIS 🌸

void cond_synchronize_rcu_expedited_full(struct rcu_gp_seq *gsp);

literally that's it. no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gsp β€” the state value you got from get_state_synchronize_rcu_full, start_poll_synchronize_rcu_full, or start_poll_synchronize_rcu_expedited_full. like, one of those three, bestie, don't just make one up πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so here's the vibe check πŸ‘‘

If a full RCU grace period has already elapsed since that call to get_state_synchronize_rcu_full, start_poll_synchronize_rcu_full, or start_poll_synchronize_rcu_expedited_full β€” the very call that gave you gsp β€” then this function just... returns. nothing to see here, we're done, bye πŸ’–

Otherwise? it invokes synchronize_rcu_expedited and actually waits for a full grace period. slay, but like, only when it has to. ⭐


⚠️ not me forgetting counter wrap 😭 β€” Yes, this function does not take counter wrap into account. But counter wrap is harmless. If the counter wraps, we have waited for more than 2 billion grace periods (and way more on a 64-bit system!), so waiting for a couple of additional grace periods should be just fine. like honestly, at that point, who's counting πŸ™ˆ

πŸ¦‹ the memory-ordering situation πŸ¦‹

This function provides the same memory-ordering guarantees that would be provided by a synchronize_rcu that was invoked at the call to the function that provided gsp and that returned at the end of this function. same energy, same guarantees, periodt ✨


🌈 SEE ALSO 🌈


okay that's the whole page bestie, you ate that πŸ’…βœ¨

source: ./kernel/rcu 🌸 date: October 2026 πŸŽ€ and yes the title is still cond_synchr...pedited_full(9) because some things never change 😭🫢 go forth and wait conditionally, queen πŸ‘‘

πŸ“¦ where this page comes from