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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAofZF7KRtTzLk7hhBSAirQ=sstmQG2gxGtbTW6LseNFzrxK1g@mail.gmail.com>
Date: Tue, 10 Jun 2025 10:56:13 +0200
From: Marco Crivellari <marco.crivellari@...e.com>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>, 
	Thomas Gleixner <tglx@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v2 2/4] Workqueue: add system_dfl_wq

Hello Lai,

>What is the reason for removing system_unbound_wq? I believe system_unbound_wq
>is a perfectly appropriate and descriptive name for its callers. I’m not opposed
>to system_dfl_wq as long as it will be an alias for system_unbound_wq (or even
>system_percpu_wq, if that can be configured at boot time by sysadim).

The rename to system_dfl_wq is mostly to make sure this is the default wq choice
when per-cpu is not strictly needed.
It has been proposed here, anyhow:

https://lore.kernel.org/all/Z79E_gbWm9j9bkfR@slm.duckdns.org/

>If anyone feels that the term "unbound" in WORK_CPU_UNBOUND is not aligned with
>the "unbound" in system_unbound_wq, I acknowledge that concern. In that case,
>I would prefer to rename WORK_CPU_UNBOUND to WORK_CPU_UNSPECIFIC.

Yes, personally I like the idea.

>Many structures and functions underlying system_unbound_wq already use 'unbound'
>in their names, so simply renaming system_unbound_wq does not increase
>consistentcy.

What if we keep system_unbound_wq and instead of a pr_warn_once we
just redirect this to
system_dfl_wq, when it is used (like in this patchset, in eg. queue_work())?


Thank you!


On Tue, Jun 10, 2025 at 5:04 AM Lai Jiangshan <jiangshanlai@...il.com> wrote:
>
> On Mon, Jun 9, 2025 at 6:35 PM Marco Crivellari
> <marco.crivellari@...e.com> wrote:
> >
> > Currently if a user enqueue a work item using schedule_delayed_work() the
> > used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
> > WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
> > schedule_work() that is using system_wq and queue_work(), that makes use
> > again of WORK_CPU_UNBOUND.
> >
> > This lack of consistentcy cannot be addressed without refactoring the API.
> >
> > system_unbound_wq should be the default workqueue so as not to enforce
> > locality constraints for random work whenever it's not required.
> >
> > Adding system_dfl_wq to encourage its use when unbound work should be used.
> >
> > queue_work() / queue_delayed_work() / mod_delayed_work() will now use the
> > new unbound wq: whether the user still use the old wq a warn will be
> > printed along with a wq redirect to the new one.
> >
> > The old system_unbound_wq will be kept for a few release cycles.
> >
>
> Hello, Macro
>
> What is the reason for removing system_unbound_wq? I believe system_unbound_wq
> is a perfectly appropriate and descriptive name for its callers. I’m not opposed
> to system_dfl_wq as long as it will be an alias for system_unbound_wq (or even
> system_percpu_wq, if that can be configured at boot time by sysadim).
>
>
> If anyone feels that the term "unbound" in WORK_CPU_UNBOUND is not aligned with
> the "unbound" in system_unbound_wq, I acknowledge that concern. In that case,
> I would prefer to rename WORK_CPU_UNBOUND to WORK_CPU_UNSPECIFIC.
>
>
> Many structures and functions underlying system_unbound_wq already use 'unbound'
> in their names, so simply renaming system_unbound_wq does not increase
> consistentcy.
>
> Thanks
> Lai



-- 

Marco Crivellari

L3 Support Engineer, Technology & Product




marco.crivellari@...e.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ