linux/net/rds
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
..
Kconfig net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
Makefile net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
af_rds.c rds: Replace POLLERR with EPOLLERR 2025-08-22 16:42:25 -07:00
bind.c treewide: use get_random_{u8,u16}() when possible, part 2 2022-10-11 17:42:58 -06:00
cong.c net: rds: delete duplicated words 2020-09-18 14:12:43 -07:00
connection.c rds: Fix endianness annotation of jhash wrappers 2025-08-22 16:44:34 -07:00
ib.c RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
ib.h RDS: IB: Remove unused declarations 2024-08-01 09:03:28 -07:00
ib_cm.c rds: ib: Remove two ib_modify_qp() calls 2021-04-12 19:51:48 -03:00
ib_frmr.c rds: ib: Increment i_fastreg_wrs before bailing out 2025-09-15 16:47:53 -07:00
ib_mr.h rds: ib: Remove unused extern definition 2025-09-08 18:16:49 -07:00
ib_rdma.c net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00
ib_recv.c RDS: remove redundant __GFP_NOWARN 2025-08-12 14:05:44 -07:00
ib_ring.c rds: Fix spelling mistakes 2021-05-31 22:45:05 -07:00
ib_send.c rds: Remove redundant assignment to nr_sig 2021-04-27 14:14:33 -07:00
ib_stats.c net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2019-09-15 20:56:19 +02:00
ib_sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
info.c rds: fix crash in rds_info_getsockopt() 2020-05-20 14:08:06 -07:00
info.h
loop.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
loop.h
message.c rds: Fix endianness annotations for RDS extension headers 2025-08-22 16:44:39 -07:00
page.c rds: Use nested-BH locking for rds_page_remainder 2025-05-15 15:23:31 +02:00
rdma.c net/rds: fix possible cp null dereference 2024-03-29 12:04:09 -07:00
rdma_transport.c net: rds: Fix possible NULL-pointer dereference 2023-09-20 08:49:03 +01:00
rdma_transport.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
rds.h rds: Fix endianness annotation for RDS_MPATH_HASH 2025-08-22 16:44:39 -07:00
rds_single_path.h
recv.c rds: Fix endianness annotations for RDS extension headers 2025-08-22 16:44:39 -07:00
send.c rds: Fix endianness annotations for RDS extension headers 2025-08-22 16:44:39 -07:00
stats.c net/rds: Replace deprecated strncpy() with strscpy_pad() 2025-02-21 15:51:26 -08:00
sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
tcp.c net: better track kernel sockets lifetime 2025-02-21 16:00:58 -08:00
tcp.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
tcp_connect.c net: prevent address rewrite in kernel_bind() 2023-10-01 19:31:29 +01:00
tcp_listen.c don't open-code kernel_accept() in rds_tcp_accept_one() 2025-07-15 16:19:54 -07:00
tcp_recv.c rds:Simplify the allocation of slab caches 2024-06-19 10:47:40 +01:00
tcp_send.c rds: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage 2023-06-24 15:50:12 -07:00
tcp_stats.c
threads.c rds: Fix fall-through warnings for Clang 2021-05-17 20:00:27 -05:00
transport.c rds: transport module should be auto loaded when transport is set 2020-06-25 16:26:25 -07:00