mirror-linux/net/ceph
Marco Crivellari 27ce71e1ce net: WQ_PERCPU added to alloc_workqueue users
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.

alloc_workqueue() treats all queues as per-CPU by default, while unbound
workqueues must opt-in via WQ_UNBOUND.

This default is suboptimal: most workloads benefit from unbound queues,
allowing the scheduler to place worker threads where they’re needed and
reducing noise when CPUs are isolated.

This change adds a new WQ_PERCPU flag at the network subsystem, to explicitly
request the use of the per-CPU behavior. Both flags coexist for one release
cycle to allow callers to transition their calls.

Once migration is complete, WQ_UNBOUND can be removed and unbound will
become the implicit default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU.

All existing users have been updated accordingly.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20250918142427.309519-4-marco.crivellari@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-22 17:40:30 -07:00
..
crush libceph: fix crush_choose_firstn() kernel-doc warnings 2024-07-11 16:33:07 +02:00
Kconfig lib/crc: remove CONFIG_LIBCRC32C 2025-04-04 11:31:42 -07:00
Makefile
armor.c
auth.c libceph: remove unnecessary ret variable in ceph_auth_init() 2021-06-28 23:49:25 +02:00
auth_none.c libceph: kill ceph_none_authorizer::reply_buf 2021-06-28 23:49:25 +02:00
auth_none.h libceph: kill ceph_none_authorizer::reply_buf 2021-06-28 23:49:25 +02:00
auth_x.c
auth_x.h
auth_x_protocol.h libceph: fix some spelling mistakes 2021-06-28 23:49:25 +02:00
buffer.c mm: allow !GFP_KERNEL allocations for kvmalloc 2022-01-15 16:30:29 +02:00
ceph_common.c libceph: optionally use bounce buffer on recv path in crc mode 2022-02-02 18:50:36 +01:00
ceph_hash.c
ceph_strings.c
cls_lock_client.c libceph: fix doc warnings in cls_lock_client.c 2021-06-28 23:49:25 +02:00
crypto.c libceph: Remove unused ceph_crypto_key_encode 2024-11-18 17:34:35 +01:00
crypto.h libceph: Remove unused ceph_crypto_key_encode 2024-11-18 17:34:35 +01:00
debugfs.c
decode.c
messenger.c net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
messenger_v1.c libceph: just wait for more data to be available on the socket 2024-02-07 14:43:29 +01:00
messenger_v2.c libceph: Rename hmac_sha256() to ceph_hmac_sha256() 2025-07-04 10:18:52 -07:00
mon_client.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
msgpool.c
osd_client.c ceph: Remove osd_client deadcode 2025-04-03 21:35:32 +02:00
osdmap.c libceph: print fsid and epoch with osd id 2022-08-03 00:54:12 +02:00
pagelist.c libceph: Remove unused ceph_pagelist functions 2024-11-18 17:34:35 +01:00
pagevec.c libceph: Remove unused pagevec functions 2024-11-18 17:34:35 +01:00
snapshot.c
string_table.c
striper.c