mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Lai Jiangshan" <jiangshanlai@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@gmail.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: rust: add delayed work items
Date: Tue, 15 Apr 2025 07:04:20 -1000	[thread overview]
Message-ID: <Z_6RlN63O5peuCC2@slm.duckdns.org> (raw)
In-Reply-To: <Z_4lLEFjobzEWT77@google.com>

On Tue, Apr 15, 2025 at 09:21:48AM +0000, Alice Ryhl wrote:
> On Mon, Apr 14, 2025 at 07:47:19AM -1000, Tejun Heo wrote:
> > On Fri, Apr 11, 2025 at 11:12:29AM +0000, Alice Ryhl wrote:
> > > This patch is being sent for use in the various Rust GPU drivers that
> > > are under development. It provides the additional feature of work items
> > > that are executed after a delay.
> > > 
> > > The design of the existing workqueue is rather extensible, as most of
> > > the logic is reused for delayed work items even though a different work
> > > item type is required. The new logic consists of:
> > > 
> > > * A new DelayedWork struct that wraps struct delayed_work.
> > > * A new impl_has_delayed_work! macro that provides adjusted versions of
> > >   the container_of logic, that is suitable with delayed work items.
> > > * A `enqueue_delayed` method that can enqueue a delayed work item.
> > > 
> > > This patch does *not* rely on the fact that `struct delayed_work`
> > > contains `struct work_struct` at offset zero. It will continue to work
> > > even if the layout is changed to hold the `work` field at a different
> > > offset.
> > > 
> > > Please see the example introduced at the top of the file for example
> > > usage of delayed work items.
> > > 
> > > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> > 
> > FWIW, looks fine to me on the first glance. Please let me know how you want
> > to route it. If you want it to be through the wq tree, please let me know
> > what to do about the dependencies (I just applied the "remove
> > HasWork::OFFSET" patch to wq/for-6.16 but don't have the other one).
> 
> Normally I think it is most natural for workqueue patches to go through
> your tree, but it may be easier to take it through Miguel's tree with
> your ack as an exception this merge window since the container_of change
> will probably also affect other work.
> 
> It sounds like this is also the conclusion you and Miguel came to in the
> thread on the HasWork::OFFSET patch.
> 
> (If you're planning to change the default workqueue configuration from
> PERCPU to UNBOUNDED this merge window, then please let me know because
> it might change the calculus here.)

The rename is going to be a while, I think. Please route this through the
rust tree.

 Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      reply	other threads:[~2025-04-15 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11 11:12 Alice Ryhl
2025-04-14 17:47 ` Tejun Heo
2025-04-15  9:21   ` Alice Ryhl
2025-04-15 17:04     ` Tejun Heo [this message]

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=Z_6RlN63O5peuCC2@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    /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

all inboxes | Powered by JetHome®