From nobody Tue Jun 16 17:01:53 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A299E34A773 for ; Thu, 30 Apr 2026 08:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777539270; cv=none; b=lYbpEvUzjcKos+qRQN7KNf+8nJsZUlA6sQNO+afQwGYzpRHhTzs+PkSKhbpBbmSLZ4N9YSb86XOcOnZOJVoUtzLhZMac/Q52tjMfdyBTggbBIGwVYMU1CLaa5vpKdfJ0UCC+5tyDz/SuCCANeqv0J1EycVCKifpcILs3nwedikA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777539270; c=relaxed/simple; bh=s/mRY8DfMR8DIXpcHgLYEU8aDoZ9DdH5IyZrbIZM1HQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=K9NeaGywqUT7NPb6lBmE1UHYHnj6ZRs28x0k0P9ILF7uEwqyhICkPRVcIu9I2WRuYTmCqFfwoNpjSFs9Lc4XCKiX+5BOCKHbhQaTox0b+7DomTrbnqDNVsfeBayjEhQQZIeoXASO5nA0Gd5WOfYx6v4pORdAbARAKln1zHJqMt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=DI4RWOBJ; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="DI4RWOBJ" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-48a3e9862f0so3880375e9.1 for ; Thu, 30 Apr 2026 01:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777539267; x=1778144067; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6A9BkChX+85bq148XRWnuRUsG5zQnCEzyenyeEOtadE=; b=DI4RWOBJuahh4eB++rrQhTMoTwFKxoIeuMBZUE3nCyMwGRCqkmfmL4KcxvsryNCjIM +oUt7drtBWksNHP3zw7RVWp+lTs7QVw7wYfTuHwWnbz1As4nzb2RRm8+FNODv5x28awH BQvJWIhe3+KDRXHYu9/IE/DUO1zB88gJJqLY+e/GqfwZPZKefybgwm5s+lIG7u7NgzbX cJHyp7SAEFAXMcLVSV4AM+NP2wa8JgRQDLT848SKE0ngQPWvUbgM+Kwl5Zy0SLCj0IbR 077gAgIYnhC3W9nudNTA021ai1SqqJowK06JObCWkPfVOv/yZNOn5KUH85QGnyYt8BEF ixdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777539267; x=1778144067; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6A9BkChX+85bq148XRWnuRUsG5zQnCEzyenyeEOtadE=; b=nhiaHrGa0ozgGNbAoqdRQpemza8ZJIjfr/SHaA314AX3EHqF8PPuCDs30az1APzx6Y RtcHdSfVocWxj6dhSLoKqkJAjpmLiWXUKqPtlmPmXBNZGif3R0Kb4mFKJV6Jd0kfgHgk HlyPZOs6SQzaCvRIQAL4NW3Zkv8Lp6EMcD/ywnbdz2Fhc/KqoL1plBct4GToWTY4hR9t +FzjqLnkYb57qPzsGPLj9Um1G/69Li01qtzRZ+sStQQj7/08JDSYdXLucEzOApbEpjng +3lDkn6NtXRMcVXRCH2S9Py5wrhjBOlUuPv05VOtamfaJUF2+r1dPZbJ4N1fraBkpH5s Vo0A== X-Gm-Message-State: AOJu0YzHKLOodXzyqTR9mC2JmaSCCHGKV3zbAz7cdD2dhPgL1w/rJkQr ldWRT8KUIdD//gzByqfWEfpG4AaPr+IutjhZLI3uoM73xK07oC3e32mLpBEDzvIkFUYrAio1b1j Xmt3uO3M= X-Gm-Gg: AeBDietvdHIwq04A1O28uVllgwaR+dL7iCMobo3+VYnkoGbzVRr49wFjISlh97oM9vc W0SJgl+GOuETM0w+tzbejWr69azpUahPqp772NSVRCKlubPPfRZ7oy4X8VWx0ziTC3tDq2zQpoi EHB6cJ6zpS9Vyp/rkbLAjtny6M9DoSepsE9PW68X3pzvghthFfqsmLawUxfNruJYD4qrcCaCReX Ou1b4k2/k28YMOslLGyw2W3B5YinnGxp2Idd7T2uHeiHTaL1Ea7zzTwonU31Ko/kmO+1O/J19el Bl53DMWyUz1WxXGUC4YIcdNiISBqBO4YWw82PFDoO+q/aNCqrkonZtnPKQT3ld6Iw5Viyv6fsQY 4K8ly8zCNeCHp4JnFDytj4hYXBbcUGYx6+ilIx+YwBJzDhoZbm51bo4JxL65IFoAx+3F/tpibAN L8UUqAXTw3+yNm2YpZVm+ovIpyKKJso4fxaCtxq1N1e+g7PrlEaxVQKhyKwRvNDofQmCfN X-Received: by 2002:a05:600c:6291:b0:48a:79d8:a8d6 with SMTP id 5b1f17b1804b1-48a85e75173mr26204975e9.7.1777539266753; Thu, 30 Apr 2026 01:54:26 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7c2fb5c7sm52906795e9.5.2026.04.30.01.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 01:54:26 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Subject: [RFC PATCH] xprtrdma: Move long delayed work on system_dfl_long_wq Date: Thu, 30 Apr 2026 10:54:12 +0200 Message-ID: <20260430085412.96961-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently the code enqueue work items using {queue|mod}_delayed_work(), using system_long_wq. This workqueue should be used when long works are expected, but it is a per-cpu workqueue. This is important because queue_delayed_work() queue the work using: queue_delayed_work_on(WORK_CPU_UNBOUND, ...); Note that WORK_CPU_UNBOUND =3D NR_CPUS. This would end up calling __queue_delayed_work() that does: if (housekeeping_enabled(HK_TYPE_TIMER)) { // [....] } else { if (likely(cpu =3D=3D WORK_CPU_UNBOUND)) add_timer_global(timer); else add_timer_on(timer, cpu); } So when cpu =3D=3D WORK_CPU_UNBOUND the timer is global and is not using a specific CPU. Later, when __queue_work() is called: if (req_cpu =3D=3D WORK_CPU_UNBOUND) { if (wq->flags & WQ_UNBOUND) cpu =3D wq_select_unbound_cpu(raw_smp_processor_id()); else cpu =3D raw_smp_processor_id(); } Because the wq is not unbound, it takes the CPU where the timer fired and enqueue the work on that CPU. The consequence of all of this is that the work can run anywhere, depending on where the timer fired. Recently, a new unbound workqueue specific for long running work has been added: c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works") So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Signed-off-by: Marco Crivellari --- net/sunrpc/xprtrdma/transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transpor= t.c index 61706df5e485..1a54993f7ffb 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -484,7 +484,8 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_tas= k *task) xprt_reconnect_backoff(xprt, RPCRDMA_INIT_REEST_TO); } trace_xprtrdma_op_connect(r_xprt, delay); - queue_delayed_work(system_long_wq, &r_xprt->rx_connect_worker, delay); + queue_delayed_work(system_dfl_long_wq, &r_xprt->rx_connect_worker, + delay); } =20 /** --=20 2.53.0