From: "Benno Lossin" <lossin@kernel.org>
To: "Marcelo Moreira" <marcelomoreira1905@gmail.com>,
<rust-for-linux@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <dakr@kernel.org>,
<ojeda@kernel.org>, <skhan@linuxfoundation.org>,
<linux-kernel-mentees@lists.linuxfoundation.org>,
<~lkcamp/patches@lists.sr.ht>
Subject: Re: [PATCH v5 1/2] rust: revocable: Refactor revocation mechanism to remove generic revoke_internal
Date: Thu, 03 Jul 2025 10:24:47 +0200 [thread overview]
Message-ID: <DB29Y9LUF90V.90X56SDRG8LN@kernel.org> (raw)
In-Reply-To: <20250626165927.66498-2-marcelomoreira1905@gmail.com>
On Thu Jun 26, 2025 at 6:59 PM CEST, Marcelo Moreira wrote:
> The revocation mechanism is refactored by removing the generic
> `revoke_internal` function. Its logic is now directly integrated into
> two distinct public functions: `revoke()` and `revoke_nosync()`.
>
> `revoke_nosync()` is an `unsafe` function that requires the caller to
> guarantee no concurrent users, thus avoiding an RCU grace period.
> `revoke()` is a safe function that internally waits for the RCU grace
> period to ensure all concurrent accesses have completed before dropping
> the wrapped object.
>
> This change improves API clarity and simplifies associated `SAFETY`
> comments by making the synchronization behavior explicit in the function
> signatures.
>
> Suggested-by: Benno Lossin <lossin@kernel.org>
> Suggested-by: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: Marcelo Moreira <marcelomoreira1905@gmail.com>
With the patch order changed:
Reviewed-by: Benno Lossin <lossin@kernel.org>
---
Cheer,
Benno
> ---
> rust/kernel/revocable.rs | 48 ++++++++++++++++++----------------------
> 1 file changed, 21 insertions(+), 27 deletions(-)
next prev parent reply other threads:[~2025-07-03 8:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 16:59 [PATCH v5 0/2] rust: revocable: documentation and refactorings Marcelo Moreira
2025-06-26 16:59 ` [PATCH v5 1/2] rust: revocable: Refactor revocation mechanism to remove generic revoke_internal Marcelo Moreira
2025-07-03 8:24 ` Benno Lossin [this message]
2025-06-26 16:59 ` [PATCH v5 2/2] rust: revocable: Clarify write invariant and update safety comments Marcelo Moreira
2025-07-01 11:27 ` [PATCH v5 0/2] rust: revocable: documentation and refactorings Alice Ryhl
2025-07-01 11:40 ` Danilo Krummrich
2025-07-01 12:40 ` Marcelo Moreira
2025-07-03 8:24 ` Benno Lossin
2025-07-05 5:09 ` Marcelo Moreira
2025-07-05 7:01 ` Benno Lossin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB29Y9LUF90V.90X56SDRG8LN@kernel.org \
--to=lossin@kernel.org \
--cc=dakr@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelomoreira1905@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=~lkcamp/patches@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).