From: Chandan Babu R <chandanbabu@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, cem@kernel.org
Subject: Re: [PATCH 2/2] repair/prefetch.c: Create one workqueue with multiple workers
Date: Thu, 06 Nov 2025 09:31:44 +0530 [thread overview]
Message-ID: <87v7jniyck.fsf@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <20251104165534.GH196370@frogsfrogsfrogs>
On Tue, Nov 04, 2025 at 08:55:34 AM -0800, Darrick J. Wong wrote:
> On Tue, Nov 04, 2025 at 02:44:37PM +0530, Chandan Babu R wrote:
>> When xfs_repair is executed with a non-zero value for ag_stride,
>> do_inode_prefetch() create multiple workqueues with each of them having just
>> one worker thread.
>>
>> Since commit 12838bda12e669 ("libfrog: fix overly sleep workqueues"), a
>> workqueue can process multiple work items concurrently. Hence, this commit
>> replaces the above logic with just one workqueue having multiple workers.
>>
>> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
>
> Yeah, this also makes sense to me. I wonder if this odd code was some
> sort of workaround for the pre-12838bd workqueue behavior?
>
The old implementation of workqueue which was present in repair/threads.c
would wakeup a worker thread only when inserting a new work item to an empty
work list. So, yes, this most likely is the reason for creating multiple
workqueues.
--
Chandan
next prev parent reply other threads:[~2025-11-06 4:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 9:14 [PATCH 1/2] libfrog: Prevent unnecessary waking of worker thread when using bounded workqueues Chandan Babu R
2025-11-04 9:14 ` [PATCH 2/2] repair/prefetch.c: Create one workqueue with multiple workers Chandan Babu R
2025-11-04 10:59 ` Christoph Hellwig
2025-11-04 16:55 ` Darrick J. Wong
2025-11-06 4:01 ` Chandan Babu R [this message]
2025-11-04 10:58 ` [PATCH 1/2] libfrog: Prevent unnecessary waking of worker thread when using bounded workqueues Christoph Hellwig
2025-11-04 16:54 ` Darrick J. Wong
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=87v7jniyck.fsf@debian-BULLSEYE-live-builder-AMD64 \
--to=chandanbabu@kernel.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@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 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.