mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lai Jiangshan <jiangshanlai@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <jiangshan.ljs@antgroup.com>,
	ying chen <yc1082463@gmail.com>,  Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH V2] workqueue: Process rescuer work items one-by-one using a positional marker
Date: Tue, 18 Nov 2025 17:39:22 +0800	[thread overview]
Message-ID: <CAJhGHyBeRDxtbfd4aZM0uQwarNNRpU27XQSCkweHB-hHQyDiEQ@mail.gmail.com> (raw)
In-Reply-To: <20251118093832.81920-1-jiangshanlai@gmail.com>

Hello

On Tue, Nov 18, 2025 at 5:34 PM Lai Jiangshan <jiangshanlai@gmail.com> wrote:

> ---
> Changed from v1:
>
> Insert the marker and use it purely as iteration marker as Tejun
> request.
>   It is hard to maintain the proper state of it, expecially maintaining
>   it only in pool->worklist which also requires an unlikely path in the
>   worker_thread() path.

It is hard to maintain the proper state of it if it is treated as a work
item as V1, especially maintaining it only in pool->worklist which
also requires an unlikely path in the worker_thread() path to
defeat the collision requeuing.

Thanks
Lai

>
> Add an unlikely path in the worker_thread() path(in assign_work()).
>
> Add other code in other place to make it not be treated like a work
> item.  I'm sure all the paths have been covered now, but I still feel
> a bit nevous about it for future changes.
>
> Extra the code to assign work in the rescuer_thread() out as
> assign_rescue_work().
>
> V1: https://lore.kernel.org/lkml/20251113163426.2950-1-jiangshanlai@gmail.com/
>

  reply	other threads:[~2025-11-18  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18  9:38 Lai Jiangshan
2025-11-18  9:39 ` Lai Jiangshan [this message]
2025-11-21  2:13 ` Tejun Heo
2025-11-21  3:18   ` Lai Jiangshan

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=CAJhGHyBeRDxtbfd4aZM0uQwarNNRpU27XQSCkweHB-hHQyDiEQ@mail.gmail.com \
    --to=jiangshanlai@gmail.com \
    --cc=jiangshan.ljs@antgroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=yc1082463@gmail.com \
    /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®