[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYVR9U47MkpecqQu@mac>
Date: Fri, 22 Dec 2023 18:08:05 +0900
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org, Naohiro.Aota@....com,
kernel-team@...a.com
Subject: Re: [PATCHSET wq/for-6.8] workqueue: Implement system-wide
max_active for unbound workqueues
Hello,
On Fri, Dec 22, 2023 at 04:04:27PM +0800, Lai Jiangshan wrote:
> The current "max_active enforcement domain" is just a historical accident.
I mean, the part that it's bound to NUMA is accidental but the fact that we
need an enforcement domain which is closer to the whole machine isn't. Most
users don't depend on max_active limit but there are a number of users that
do and what they usually want to express is "I want to be able to saturate
the whole machine but avoid creating pointless over-saturation", which
usually comes down to some multiples of the number of CPUs.
Note that there may be a single issuer or multiple issuers and we want to be
able to saturate the machine while avoding over-saturation in both cases. If
we segment max_limit enforcement to smaller units like CPUs or L3 caches,
there's no good way to express these constraints. A number which is too
smaller for single issuer case is already too big for multiple issuer case.
I tried to explain the conundrum in the cover letter but if that's not
sufficient, we can keep discussing. It'd be also useful to read what Naohiro
reported as that shows the problem pretty well.
> IMO, it is better to change the semantics of max_active and the related
> alloc_workqueue() callers rather than add a large bulk of complicated
> code. Most of alloc_workqueue() are called with max_active=0, so it is
> feasible.
Yeah, I mean, if we can, that'd be simpler. I don't think we can. It's a
rather fundamental problem. If you have concrete suggestions, please feel
free to share.
Thanks.
--
tejun
Powered by blists - more mailing lists