All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Aakash Bollineni via B4 Relay
	<devnull+aakash.bollineni.multicorewareinc.com@kernel.org>
Cc: aakash.bollineni@multicorewareinc.com,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] rust: workqueue: add safe cancellation and status methods
Date: Thu, 2 Apr 2026 14:19:27 +0300	[thread overview]
Message-ID: <20260402141927.667a50c4@nimda> (raw)
In-Reply-To: <20260402-rust-next-v1-0-0940bb8f201c@multicorewareinc.com>

Hi Aakash,

On Thu, 02 Apr 2026 08:53:45 +0530
Aakash Bollineni via B4 Relay
<devnull+aakash.bollineni.multicorewareinc.com@kernel.org> wrote:

> This series modernizes the Rust workqueue infrastructure by adding
> methods for status checking and safe cancellation. These capabilities
> are essential for implementing safe driver teardown paths, such as in
> 'Drop' implementations or device removal, where background tasks must
> be stopped before resources are freed.
> This version (v2) addresses the feedback from Miguel Ojeda:

I thought this series was v1 because it doesn't have the version
prefix. Please make sure to include the version tag in your subject
line (e.g., [PATCH v2 0/3]) so maintainers can track the revisions
properly.

Thanks,
Onur

> - The work has been split into a logical 3-patch series.
> - Spurious changes (top-level .kunitconfig) have been removed.
> - Initialization for DelayedWork is now handled via a robust C-helper
>   (INIT_DELAYED_WORK) to ensure correct timer function registration.
> - Pointer arithmetic in the reclamation path has been simplified and
>   verified to be underflow-free.
> Summary of changes:
> 1. Helpers: Adds C FFI wrappers for workqueue macros and robust
>    DelayedWork initialization.
> 2. Core API: Implements is_pending(), cancel(), and cancel_sync() with
>    guaranteed pointer reclamation and layout safety
> (#[repr(transparent)]). 3. Tests: Adds a comprehensive KUnit suite
> and a standalone stress-test sample.
> The implementation has been verified on x86_64 using KUnit (4/4
> PASSED) and confirmed to be race-free under high-load stress testing.
> Changelog v1 -> v2:
> - Split into a 3-patch series to separate helpers from API and tests.
> - Replaced manual timer initialization with
> rust_helper_init_delayed_work.
> - Fixed field offset arithmetic in container_of macro path.
> - Expanded KUnit tests to cover DelayedWork specifically.
> - Wrapped commit messages and cover letter to 75 columns.
> 
> Signed-off-by: Aakash Bollineni
> <aakash.bollineni@multicorewareinc.com> ---
> Aakash Bollineni (3):
>       rust: helpers: add workqueue helpers
>       rust: workqueue: add safe cancellation and status methods
>       rust: workqueue: add KUnit and sample stress tests
> 
>  rust/helpers/workqueue.c            |  34 +++
>  rust/kernel/workqueue.rs            | 467
> +++++++++++++++++++++++++++++++++--- samples/rust/Makefile
>    |   2 + samples/rust/rust_workqueue_test.rs | 214 +++++++++++++++++
>  4 files changed, 682 insertions(+), 35 deletions(-)
> ---
> base-commit: bf074eb6891be799174ff42e0051492681fdc045
> change-id: 20260402-rust-next-19ba03aad3f4
> 
> Best regards,


  parent reply	other threads:[~2026-04-02 11:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02  3:23 [PATCH 0/3] rust: workqueue: add safe cancellation and status methods Aakash Bollineni
2026-04-02  3:23 ` Aakash Bollineni via B4 Relay
2026-04-02  3:23 ` [PATCH 1/3] rust: helpers: add workqueue helpers Aakash Bollineni
2026-04-02  3:23   ` Aakash Bollineni via B4 Relay
2026-04-02  3:23 ` [PATCH 2/3] rust: workqueue: add safe cancellation and status methods Aakash Bollineni
2026-04-02  3:23   ` Aakash Bollineni via B4 Relay
2026-04-02  3:23 ` [PATCH 3/3] rust: workqueue: add KUnit and sample stress tests Aakash Bollineni
2026-04-02  3:23   ` Aakash Bollineni via B4 Relay
2026-04-02 11:23   ` Onur Özkan
2026-04-02 11:34   ` Onur Özkan
2026-04-02 11:19 ` Onur Özkan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-07 11:06 [PATCH 0/3] rust: workqueue: add safe cancellation and status methods Aakash Bollineni
2026-04-07 11:06 ` Aakash Bollineni via B4 Relay

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=20260402141927.667a50c4@nimda \
    --to=work@onurozkan.dev \
    --cc=aakash.bollineni@multicorewareinc.com \
    --cc=devnull+aakash.bollineni.multicorewareinc.com@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.