From: Viacheslav Dubeyko Date: Thu, 9 Apr 2026 19:09:40 +0000 (-0700) Subject: libceph: switch ceph-msgr workqueue from WQ_PERCPU to WQ_UNBOUND X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a0900008c815e35862b690ac4ca971a836ddefb5;p=ceph-client.git libceph: switch ceph-msgr workqueue from WQ_PERCPU to WQ_UNBOUND The ceph-msgr workqueue was changed to use WQ_PERCPU in commit 27ce71e1ce81 ("net: WQ_PERCPU added to alloc_workqueue users") as part of a tree-wide transition to make per-CPU workqueue binding explicit. However, ceph_con_workfn contains a while(true) loop that retries on -EAGAIN from socket reads and writes, making it capable of hogging a bound CPU for extended periods. This manifests at runtime as: workqueue: ceph_con_workfn hogged CPU for >10000us N times, consider switching to WQ_UNBOUND Switch the workqueue to WQ_UNBOUND so the scheduler can freely place workers across CPUs, preventing starvation of other work items on the bound CPU. The loss of cache locality is acceptable for network I/O work. Fixes: 27ce71e1ce81 ("net: WQ_PERCPU added to alloc_workqueue users") Signed-off-by: Viacheslav Dubeyko cc: Alex Markuze cc: Ilya Dryomov cc: Patrick Donnelly cc: Ceph Development --- diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0c2c01b31ef4..d9cdd13dfb4b 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -253,7 +253,7 @@ int __init ceph_msgr_init(void) * connections, so leave @max_active at default. */ ceph_msgr_wq = alloc_workqueue("ceph-msgr", - WQ_MEM_RECLAIM | WQ_PERCPU, 0); + WQ_MEM_RECLAIM | WQ_UNBOUND, 0); if (ceph_msgr_wq) return 0;