From: Alice Ryhl <aliceryhl@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
Philipp Stanner <phasta@mailbox.org>,
Danilo Krummrich <dakr@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: flush all pending jobs in destroy_workqueue()
Date: Mon, 28 Apr 2025 09:32:46 +0000 [thread overview]
Message-ID: <aA9LPkxMlXT_Dqg3@google.com> (raw)
In-Reply-To: <aAvhxfGvndybqkJm@slm.duckdns.org>
On Fri, Apr 25, 2025 at 09:25:57AM -1000, Tejun Heo wrote:
> Hello,
>
> On Fri, Apr 25, 2025 at 09:33:54AM +0000, Alice Ryhl wrote:
> ...
> > Hmm. I think we would need to add a new field to delayed_work to keep
> > track of which list it has been added to.
>
> Can't we use the same cpu that's already recorded in delayed_work->cpu?
Isn't that just going to be equal to WORK_CPU_UNBOUND most of the time?
Though I guess we could use the values NR_CPUS .. 2*NR_CPUS-1 to
remember which list is used when it is unbound.
> > Another option could be to add a boolean that disables the list. After
> > all, we never call destroy_workqueue() on system_wq so we don't need the
> > list for that workqueue.
>
> It's not just system_wq tho. Any busy workqueue can hit scalability problems
> and the result would be usually subtle performance penalties. If we can keep
> it cheap enough, I'd prefer the behavior uniform across all workqueues.
Yeah ... that does make sense.
Alice
next prev parent reply other threads:[~2025-04-28 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 17:51 [PATCH] workqueue: flush all pending jobs in destroy_workqueue() Alice Ryhl
2025-04-24 19:57 ` Tejun Heo
2025-04-25 9:33 ` Alice Ryhl
2025-04-25 9:57 ` Philipp Stanner
2025-04-25 19:25 ` Tejun Heo
2025-04-28 9:32 ` Alice Ryhl [this message]
2025-04-28 18:30 ` Tejun Heo
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=aA9LPkxMlXT_Dqg3@google.com \
--to=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phasta@mailbox.org \
--cc=tj@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.