From: Viacheslav Dubeyko 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 --- net/ceph/messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 108adb583744..dbca8bfaf5fc 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; -- 2.53.0