From: Tejun Heo <tj@kernel.org>
To: Breno Leitao <leitao@debian.org>, Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org, clm@meta.com, kernel-team@meta.com
Subject: Re: [PATCH] workqueue: release PENDING in __queue_work() drain/destroy reject path
Date: Fri, 08 May 2026 08:04:30 -1000 [thread overview]
Message-ID: <4199d1e6c2abd65d70a367f913c31045@kernel.org> (raw)
In-Reply-To: <20260507-workqueue_pending-v1-1-3a53e2facf4e@debian.org>
Hello,
On Thu, 07 May 2026 04:04:46 -0700, Breno Leitao wrote:
> The caller of __queue_work() owns WORK_STRUCT_PENDING, won via
> test_and_set_bit() in queue_work_on()/__queue_delayed_work(). The
> state machine documented above __queue_work() requires that owner
> to either hand the token to a pwq (insert_work() -> set_work_pwq()),
> hand it to a timer, or release it via set_work_pool_and_clear_pending().
> try_to_grab_pending() relies on this: when it observes
> "PENDING && off-queue" it busy-loops, trusting the current owner to
> make progress.
>
> [...]
Applied to wq/for-7.1-fixes (capitalized the first word of the
subject).
Thanks.
--
tejun
prev parent reply other threads:[~2026-05-08 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 11:04 [PATCH] workqueue: release PENDING in __queue_work() drain/destroy reject path Breno Leitao
2026-05-08 18: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=4199d1e6c2abd65d70a367f913c31045@kernel.org \
--to=tj@kernel.org \
--cc=clm@meta.com \
--cc=jiangshanlai@gmail.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox