From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org, Lai Jiangshan <jiangshan.ljs@antgroup.com>
Subject: Re: [PATCH] workqueue: Avoid nr_active manipulation in grabbing inactive items
Date: Wed, 19 Jun 2024 07:44:22 -1000 [thread overview]
Message-ID: <ZnMY9qE9Es3_3kEp@slm.duckdns.org> (raw)
In-Reply-To: <20240619103934.2701-1-jiangshanlai@gmail.com>
On Wed, Jun 19, 2024 at 06:39:34PM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <jiangshan.ljs@antgroup.com>
>
> Current try_to_grab_pending() activates the inactive item and
> subsequently treats it as though it were a standard activated item.
>
> This approach prevents duplicating handling logic for both active and
> inactive items, yet the premature activation of an inactive item
> triggers trace_workqueue_activate_work(), yielding an unintended user
> space visible side effect.
>
> And the unnecessary increment of the nr_active, which is not a simple
> counter now, followed by a counteracted decrement, is inefficient and
> complicates the code.
>
> Just remove the nr_active manipulation code in grabbing inactive items.
>
> Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Applied to wq/for-6.11.
Thanks.
--
tejun
prev parent reply other threads:[~2024-06-19 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 10:39 Lai Jiangshan
2024-06-19 17:44 ` 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=ZnMY9qE9Es3_3kEp@slm.duckdns.org \
--to=tj@kernel.org \
--cc=jiangshan.ljs@antgroup.com \
--cc=jiangshanlai@gmail.com \
--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
all inboxes | Powered by JetHome®