srcu_down_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the srcu_down_read(9) page from the Kernel API Manual πŸ’– this one is short, sweet, and very real:

  • srcu_down_read β€” register a new reader for an SRCU-protected structure. 🫢

✨ SYNOPSIS ✨

int srcu_down_read (struct srcu_struct *ssp );

πŸŽ€ ARGUMENTS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

This call enters a semaphore-like SRCU read-side critical section. And yes, SRCU read-side critical sections may be nested. 🌸

bestie, the big no-no: it is illegal to call anything that waits on an SRCU grace period for the same srcu_struct, whether directly or indirectly. πŸ’€

One way to indirectly wait on an SRCU grace period is to acquire a mutex that is held elsewhere while calling synchronize_srcu or synchronize_srcu_expedited. But if you want lockdep to help you keep this stuff straight, you should instead use srcu_read_lock. πŸ’…

The semaphore-like nature of srcu_down_read means that the matching srcu_up_read can be invoked from some other context β€” for example, from some other task or from an irq handler. πŸ¦‹ However, neither srcu_down_read nor srcu_up_read may be invoked from an NMI handler. 🚫 no NMI vibes, periodt.

Calls to srcu_down_read may be nested, similar to the manner in which calls to down_read may be nested. The same srcu_struct may be used concurrently by srcu_down_read and srcu_read_lock. ✨


🌈 SEE ALSO 🌈

Kernel file ./include/linux/srcu.h β€” and the whole squad is:


okurrr, that's the whole srcu_down_read(9) page β€” source/version ./include/linux, dated October 2026. go forth and register those readers, bestie πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from