Re: [PATCH v2 1/3] rust: sync: Add abstraction for synchronize_rcu()

"Danilo Krummrich" <[email protected]>
Newsgroups org.kernel.vger.rcu,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Mon Jun 22, 2026 at 7:32 PM CEST, Philipp Stanner wrote:
> +/// Wait for one RCU grace period.
> +///
> +/// You typically do this to wait for everyone holding a [`Guard`].

NIT: "typically" reads a bit as if there were other reasons to call
synchronize_rcu() than to wait for all concurrent RCU read side critical
sections.

Also, while it's implicit, it might still be worth to explicitly call out that
this means concurrently held Guard objects (concurrent read side critical
sections), i.e. subsequent read side critical sections may still run
concurrently.

> +#[inline]
> +pub fn synchronize_rcu() {
> +    // SAFETY: `synchronize_rcu()` is always safe to be called. It just waits for a grace period.
> +    unsafe { bindings::synchronize_rcu() };
> +}
> -- 
> 2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.