srcu_read_lock_fast(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie πŸ’– welcome to the srcu_read_lock_fast(9) page from the Kernel API Manual β€” yes, we're doing kernel SRCU today and it's gonna be iconic ✨

✨ NAME ✨

srcu_read_lock_fast β€” register a new reader for an SRCU-protected structure. πŸŽ€

πŸŽ€ SYNOPSIS πŸŽ€

struct srcu_ctr __percpu * srcu_read_lock_fast (struct srcu_struct *ssp
);

πŸ’– ARGUMENTS πŸ’–

  • ssp β€” the srcu_struct in which to register the new reader. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function enters an SRCU read-side critical section, but specifically for a light-weight smp_mb-free reader. πŸ¦‹ if you want more info, see srcu_read_lock. this one is NMI-safe, in a manner similar to srcu_read_lock_nmisafe β€” yes bestie, it's giving safe-in-NMI energy ✨

for srcu_read_lock_fast to be used on an srcu_struct structure, that structure must have been defined using either DEFINE_SRCU_FAST or DEFINE_STATIC_SRCU_FAST on the one hand, or initialized with init_srcu_struct_fast on the other. 🌸

🚨 such an srcu_struct structure cannot be passed to any non-fast variant of srcu_read_{,un}lock or srcu_{down,up}_read. in kernels built with CONFIG_PROVE_RCU=y, __srcu_check_read_flavor will complain bitterly if you ignore this restriction. 😭

grace-period auto-expediting is disabled for SRCU-fast srcu_struct structures because SRCU-fast expedited grace periods invoke synchronize_rcu_expedited, IPIs and all πŸ”₯. if you need expedited SRCU-fast grace periods, use synchronize_srcu_expedited. periodt.

the srcu_read_lock_fast function can be invoked only from those contexts where RCU is watching, that is, from contexts where it would be legal to invoke rcu_read_lock. otherwise, lockdep will complain πŸ’€

🌈 SEE ALSO 🌈

start with the kernel file ./include/linux/srcu.h, then go say hi to all these faves πŸ‘‘:


big kiss and a sparkle 🫢 β€” source ./include/linux, date October 2026, page srcu_read_lock_fast(9). slay πŸ’…βœ¨

πŸ“¦ where this page comes from