lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBEWmCB5Ofr5lCp7@slm.duckdns.org>
Date: Tue, 29 Apr 2025 08:12:40 -1000
From: Tejun Heo <tj@...nel.org>
To: Junxuan Liao <ljx@...wisc.edu>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
	David Sterba <dsterba@...e.com>,
	Lai Jiangshan <jiangshanlai@...il.com>, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: btrfs thread_pool_size logic out of sync with workqueue

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ