From: Tejun Heo <tj@kernel.org>
To: Junxuan Liao <ljx@cs.wisc.edu>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: btrfs thread_pool_size logic out of sync with workqueue
Date: Tue, 29 Apr 2025 08:12:40 -1000 [thread overview]
Message-ID: <aBEWmCB5Ofr5lCp7@slm.duckdns.org> (raw)
In-Reply-To: <5ee9b1d7-4772-4404-b972-93b01ed1e033@cs.wisc.edu>
On Mon, Apr 28, 2025 at 06:23:39PM -0500, Junxuan Liao wrote:
> Hi all,
>
> Commit 636b927eba5bc63375 (workqueue: Make unbound workqueues to use
> per-cpu pool_workqueues) makes max_active per CPU for unbounded
> workqueues as well, but thread_pool_size in btrfs_fs_info and the mount
> option thread_pool still assume the limit is global.
>
> e.g. The default value of 8 allows a total of 64 workers on an 8-CPU
> machine.
>
> As far as I know, this means that on the Btrfs side we can no longer
> control the concurrency level at the same granularity as before. We
> should rewrite the auto-scaling logic, change the default
> thread_pool_size value, and update the documentation.
>
> Am I missing something?
5797b1c18919 ("workqueue: Implement system-wide nr_active enforcement for
unbound workqueues") turned max_active system-wide. The count is now split
across nodes proportional to the number of cpus each node has. This is still
a different behavior from before where max_active was applied per node, but
no behavior change on single node machines and the new behavior is easier to
work with.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-04-29 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 23:23 Junxuan Liao
2025-04-29 18:12 ` Tejun Heo [this message]
2025-04-29 18:28 ` Junxuan Liao
2025-04-29 18:35 ` Tejun Heo
2025-04-29 21:15 ` Junxuan Liao
2025-04-29 21:26 ` Junxuan Liao
2025-04-30 18:46 ` 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=aBEWmCB5Ofr5lCp7@slm.duckdns.org \
--to=tj@kernel.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jiangshanlai@gmail.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljx@cs.wisc.edu \
/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®