From nobody Sat Jul 25 02:39:14 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 D99D239B498 for ; Mon, 20 Jul 2026 10:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542162; cv=none; b=eZ9bKrd9PfRphaqdfBAKeMtBwN9Hj2ffW9lb9EQCf4l13ry05LkHEEUhow1idG6a8ZRWbnWeqz24FTr31bDuHQ15u6il/TFXoYtumTX0nG4LIPYjSwFTuX0grr6ROuE1TWSFNlYGjBdOnmGEpz6eJq9V3pyImoqwHlG3K0IhPVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542162; c=relaxed/simple; bh=is9pRKH68sgWldBTQb5hY+k8EycmAvAXFj8N7PH80Zk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qv2xiGZRy5kwyU9A7gpooJY5GZ1s3u3+OCt/3iy4AOBIaE9z416+E7QDOuqGVm7qCNtGZUlrG9UBHYbta9BjUe0YSBvj7wfD2Biwsfxyc+u9oZ+DeNsJjV533YoYccJFIblyJdpB0TaUuJbincg4z0Y30ccqO6KP1MLNv0qDtZs= 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=KT6N9D+E; arc=none smtp.client-ip=209.85.128.47 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="KT6N9D+E" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-49556f97a9dso8207395e9.1 for ; Mon, 20 Jul 2026 03:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542152; x=1785146952; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=POoWktMdOXvQialSyT5Wj6jwaYCnpEUeXXbNynanq18=; b=KT6N9D+ET72HP7+TFwiUqxXJfu0+9IYVPxudUBWO7LaXKT4LvMQZ81T/ImrO1Ka7OO yeDY3/WhYDN4WsUC7WhrpVYzZiCA1S6Mr9VPO7oD9Sfvdg001CwfXNWSJxKVqp7UOLfE /f0KCmRmTTaQE7fublwrx420lP0RKludDmd/6zKAMs98GAJxoiSG64q8fbeHZHRPZhYH NsnKLMJEBy2weW2KuA33Uh2dWjx7ryVhteEkHE6WU7pssAoHBCQ7p7WxCwtcvEj7LyQT ZqwoTyJL1QNvPJQXvkFOOWBamK/tBkhTSbNsExzJG5sw/nCTtA/TRMk+bDCnjI1sdSkL c0Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542152; x=1785146952; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=POoWktMdOXvQialSyT5Wj6jwaYCnpEUeXXbNynanq18=; b=XvEz7N2XJk+tetfjU/iCEDnrVh7MrBS1W8jvorzyx4vUe8KgL8l3bvetI2RcIkuES0 hKLqM/eSN+UoYEN/t7GL1Tl+fum5aFaB7kSEumg2ZFjx6q3uFd8LZlecoiENheDTTEZZ JyDtjKP1/nM2TigQYfsjzTeIp202dd+TnkZuKsSfyauzTfiW/ZOntzd+d5yOWBFc9I1x s3OpPoynmPG3bAENBzdJjLQ97r4pd352gm23hj7seSm7QUDN7wzi3+a7WqRC8nQyYjNW 8M37sDrVwbuQ7cFY/OwiRDAaWE2hCWdsu47tf0+fck0IcujqEks7aAhuMLNe4ut1M/t/ Jv/Q== X-Gm-Message-State: AOJu0YytrbJRdcdERBmA+4rBv96+YFkMQYlTSm1oZSwfxPcqz+Xd8IGW OoOgtSFYcckkyc8raPYr9snBMhukCMnq6oiwPObWTsnHZZd+NEI2Phm72OSQTe1F5qVgIc2KJ9n GHK+wT+U= X-Gm-Gg: AfdE7clytnDleP86oPgPYfyY0a0IAN/smNwdO50vXoqvYQZWHE6wP0xSbwB+zrQeuZH paEJEeCrY19g7JY6mgJ+QFKP6Co+KSK4cLQWIH5NjCRq2a8LnOLaDh7CmU7uI8kL+JBBDtfE+vj doFYXql/b8eG4mVglVrZWzY+Ln8Oh1ttK4PecnbsNOSpuyPf/gnwxsLKnVV3/sgMyZPrE+DLVER n5bQUf+RvV1hrbLT6+HBXnDMBT2ND1/yKAQVVHAY1IvEkFSGlsfi2qvGeVwLR/OYol0WSEFW+jG gIDe5oEPBREIkVYn389iXkRX+lKll/UJcuHdQuvE90eDWZdszED5oId4Wq+mEcmQvKf6NoYoc/X DjQDS3Ipabzf/v0HM5RZSTd5OOds5QqYoGAH2D/wxf6YdeDoLOJ708rszFTnqt9kWdom2pu/qM+ LnffqCvwPsKFA1d0CBTUl7MlaDxA== X-Received: by 2002:a05:600c:3143:b0:493:faf3:3ea5 with SMTP id 5b1f17b1804b1-4954a3d0925mr148347665e9.4.1784542152138; Mon, 20 Jul 2026 03:09:12 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:11 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Haren Myneni , Rick Lindsley , Nick Child , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 net-next 1/6] ibmvnic: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:51 +0200 Message-ID: <20260720100902.155605-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: Haren Myneni Cc: Rick Lindsley Cc: Nick Child Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy (CS GROUP) Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Marco Crivellari Reviewed-by: Jacob Keller --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/= ibmvnic.c index 5a510eed335e..d4c284c8ef43 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -3229,7 +3229,7 @@ static void __ibmvnic_reset(struct work_struct *work) if (adapter->state =3D=3D VNIC_PROBING && !wait_for_completion_timeout(&adapter->probe_done, timeout)) { dev_err(dev, "Reset thread timed out on probe"); - queue_delayed_work(system_long_wq, + queue_delayed_work(system_dfl_long_wq, &adapter->ibmvnic_delayed_reset, IBMVNIC_RESET_DELAY); return; @@ -3267,7 +3267,7 @@ static void __ibmvnic_reset(struct work_struct *work) spin_lock(&adapter->rwi_lock); if (!list_empty(&adapter->rwi_list)) { if (test_and_set_bit_lock(0, &adapter->resetting)) { - queue_delayed_work(system_long_wq, + queue_delayed_work(system_dfl_long_wq, &adapter->ibmvnic_delayed_reset, IBMVNIC_RESET_DELAY); } else { @@ -3454,7 +3454,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adap= ter, list_add_tail(&rwi->list, &adapter->rwi_list); netdev_dbg(adapter->netdev, "Scheduling reset (reason %s)\n", reset_reason_to_string(reason)); - queue_work(system_long_wq, &adapter->ibmvnic_reset); + queue_work(system_dfl_long_wq, &adapter->ibmvnic_reset); =20 ret =3D 0; err: --=20 2.54.0 From nobody Sat Jul 25 02:39:14 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 B0A7B3E16A8 for ; Mon, 20 Jul 2026 10:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542165; cv=none; b=Iwa5IVt4en1hmSIbjN8cg5fEqFZ+IXvKuewh8aXIptfh1coTXg5n2CDohzhx6wcoyqMqLmo0OpDWaydq2J11hqhbIBFhP1KcSfaZQijteYFrlkZZhxFLgY86aZOJ1o4pMwQFFbqYhGVaUe1TrGN1jRsllGht+V6wRCj3bENmh/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542165; c=relaxed/simple; bh=Rv9DeY3sVQADSDinNUAIAVGb1zyRUZLjDXTC9l8OOCo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C56ByASeP4ZCAwWJsrJyxkJJXjEqsvxSxOmZ9z4qCE2mE9Smpx78bYSFTokYJ8eUdrg7obIRV93qdDxWa+aihOToTQOXwrWK+WgFbKX4PRoW3u/FFiLnZtDJPFXo69N/Ft6fQCaKmvWcpSoM48gOhX6cMHAf5t7HwtCu4unXveE= 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=RgePxscT; arc=none smtp.client-ip=209.85.128.52 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="RgePxscT" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-49545ba3d4eso18252985e9.3 for ; Mon, 20 Jul 2026 03:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542153; x=1785146953; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=m6RbzNK+eNCezcWvhoJEyPH0JtE0jxe26kaL9SwOJjI=; b=RgePxscTc3tyndwLWY8C9OJ6+UN0KcLZPpq7+QSabsOIJ3oa2vNEwOkCIih8+6GCqw BaQOAV2rNxgn6t9kwHP2hHC1lr3EbRWFsWxIbNtprJqH4wBaJsXzObkZDNVSdMy3Urt5 TXCTpH4EBGIIKA0/SMyjSV71kerqYKzBmsohX4KF6/qg8LQO6kmkz6YxokShStUpstRi 5EuxmbBoCPeIVVbv1OQjiG8rRZf0DgEOVDuqGDe6o7i54gE8nvH0UIKcjXV6+sqgSS5W 7eC3MD4aG99JOlA4Nm2S/4pOmjC7kJVs9pDJEhQltrPMnF3KvfXCoh370PwFSqCZ/IwE OYpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542153; x=1785146953; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=m6RbzNK+eNCezcWvhoJEyPH0JtE0jxe26kaL9SwOJjI=; b=nCOoXBRSLIxog+VZAhMXP9i5A7NAshyqFXh/+X0cOFEEskoszbIgoJVAxClCoJqMxt SUg9N3i5sD9cn6jblf8j2m+IhRAFFNmy3qhsNhU+IsKmJ0G+NFUlrPur84GKIvE9rZa3 5JcivWjftrQXs9WOl2tMfEQEFTtvTI8wnemiBjkN2yiJPlTJLgj9kWLV38hiwhB5GtOw SejiD3AffKMBZKcH7zyaH4PMVuk6tZa5T14LDxuxit0KiGeORG3Vk41zDggQ2v0z0QRZ gMtsDKri1r/1jPZJMz8hUiwSCk8OA3Om5DxHoGn+w3SJZ7qqCPN/6oMQ4A2IbbKtuByg TUJA== X-Gm-Message-State: AOJu0YwVzzY9+LH5l3fN+H1FhTx1A3dZscc+0ors12rtLsAA9O2nm6BN CVUMHml15tIjfKrmCSoU/RXMfIbE2dcf5HLeXBKVVQtosVc1Z64Ugv0z18atL7yCMtuYUmQzJZV 2mPxwXnE= X-Gm-Gg: AfdE7cmlzPFKw/Q/kwKndFBQBZ7WwFb2qNOo4mHGC9NgcyRMwOBXTfCQI/l+xv3d67L eWx5O02ntxe5481COnWcMmJ1jGQeLGBkvCTp5Oqw9rqVsKwUlNl3emDgXUgDJR0Fhdkv7kfizXX sPK6gBe5B6wH83DbmIJa0e5gXjXVlsFO3iKc+WO6OO/NNkT7e/qmbxCk1ILQLrHN66ZsU0bp574 u9/6TDWDn8z+wCoz4k3FqTAHAxXqGavfybkN66C3wFkxSP/lhNbOG/n+BtLaqCtzX5jc5IYLVHE knAy/WZ39CITx0TWeajTFt2FYYs+1OGOouOPFXr9Ctj45vT9XSvSkTiLKM/P1rTuKTqdC9eGFc9 KYFYpbQawFdRzEgNDi9RQn3dQ8ACiA1+ZVYnDhnblpFjy7T+7iRcNMHwTF0MXLLaGr51GomeIr8 cHtGGonN0b5g8/oG8Oz188aEgpTw== X-Received: by 2002:a05:600c:1554:b0:493:c10c:22f0 with SMTP id 5b1f17b1804b1-4954a50d963mr170983735e9.20.1784542153212; Mon, 20 Jul 2026 03:09:13 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:12 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros , linux-arm-kernel@lists.infradead.org, Richard Cheng Subject: [PATCH v3 net-next 2/6] net: ti: icssg-stats: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:52 +0200 Message-ID: <20260720100902.155605-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: MD Danish Anwar Cc: Roger Quadros Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Marco Crivellari Reviewed-by: Richard Cheng Reviewed-by: Jacob Keller --- drivers/net/ethernet/ti/icssg/icssg_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_stats.c b/drivers/net/ethe= rnet/ti/icssg/icssg_stats.c index 7159baa0155c..7d6d6692d819 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_stats.c +++ b/drivers/net/ethernet/ti/icssg/icssg_stats.c @@ -69,7 +69,7 @@ void icssg_stats_work_handler(struct work_struct *work) stats_work.work); emac_update_hardware_stats(emac); =20 - queue_delayed_work(system_long_wq, &emac->stats_work, + queue_delayed_work(system_dfl_long_wq, &emac->stats_work, msecs_to_jiffies((STATS_TIME_LIMIT_1G_MS * 1000) / emac->speed)); } EXPORT_SYMBOL_GPL(icssg_stats_work_handler); --=20 2.54.0 From nobody Sat Jul 25 02:39:14 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 5B6773D9DB8 for ; Mon, 20 Jul 2026 10:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542168; cv=none; b=X4zc1c0o095NtHadU5vtmN6ra0onzCvewRhlOqe/MsqivG+1wkuW0zlRwdE/CBp4WZkCW/kgg3o6K1q+TbII6/wle0wylsUEHTInTfp8MSp7c9kOt3d+EE4MFcw7d+ogJi9jkd4pkUAHecMBsP5zYhwWBYyd0kYfPRF6XPE+KI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542168; c=relaxed/simple; bh=lpEOlelEDdowQ29B0K+0uxtyLSj3QirYX9EDl3TuqDM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Qv4VCmeRi0i0iA13/mKdwbT5kwAh5b4hoYfk8SkhvbYxqAwYNw1OsepeIFfyPTg4eAcMSV1RN+yLusXwpWBeUKx36cj7cUryeSgv+VTtqEB7niURYS5semi6Be63NwHN3cVknP+6IU90KjH9M1epnwmDGU1hux4/9U2AX6spk4k= 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=B3hgWBVM; arc=none smtp.client-ip=209.85.128.48 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="B3hgWBVM" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-493f75f7172so77796495e9.1 for ; Mon, 20 Jul 2026 03:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542154; x=1785146954; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2toGQllSDboah8Z4uj+3S/HCH3zIDshmSqNuhS072dI=; b=B3hgWBVMsj5d5/RdcxR38adGPDqr0SMQ8CgN/UFro7Ea5xKEQ+j4+e3B9qrYEzJF6Z 1j0PY6EE/hFK2if4/Tm1TLFr47TElTt2kYa86Hc/RGi+z2+H9RQMXjlnaf4xdBYCCdqq 2ifRvjie5pZbqdtlvUc6Sbgyi23+lpwXStRtpI3XJN8uHI1RZzhCrAWavN8Z6ugAYOqe +IP3P32WuhVmfr8wA/0VUULXqpJEVryPjkrDqUlK37t7Ka+RUlpXnlDmIG08WDFLw7xW TZlhxXfFVJPWzme296fOIWyNWXIaNkorM3KhxCJ1R3m0YK71piGTyDfH2tDUM7tgq/ZZ T+3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542154; x=1785146954; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2toGQllSDboah8Z4uj+3S/HCH3zIDshmSqNuhS072dI=; b=FMDeJHQphyDJCps8Is9Wb51Mhg//wCwYxfhQkGcEyqa5UJ9fNj7pG5ya/LRT1r4Qgo QMyEm3H7vk+ALnfHgUq8krd07Is/2bZjeoZ6Ce/G8GkBjf/2jvvRpxvftML0ecSTm2PH O3V71ZXj0vdV8h19CxQPQCYDQzoH/LjHEp30UoaulXrIbY1+GpjI5/A0JG3Lk0NQdf0+ /eF0HiLagaVWrBaFFydO0KxW+mz3UhUQaNxId9+cf/1A+mWpUKXMxFOq/VgTTZohx7c5 kbxXI4tu96nhFC+lSS6nR2GN3afHKHYkUFuNOc05EYiNgnlDYnvMebBnkFbSC8QT7cQN 5frg== X-Gm-Message-State: AOJu0YymzWJ6U8qhTCmhVwy79eRwAoD8rcN1SfXxBaEnengM4w6fOnB2 MXgntBde8hKki+OUZ41+cNU9um/z42nAif051b6Fz6am63xyptnnouQ5aHK3L1UtbTY3HaRk3PA QBcXQxuY= X-Gm-Gg: AfdE7ck5V/AB54DY6QcI//9dswNVzjclWw4QsnV9Er77hJfxex+Eo4R466gpKZX2mq8 XUkA64wVNnaODBy78RllhDikVARxMosWQ6r5qaqNfhyWiP2iFhLmTksE7Etg60r6BrLP4a9DxOG 6lvx15pQxJxVIEnsb411lCGRacNvUFaxEEAOe2SwmTN1wVbOlMapH5691Oi7c8YaMNzQu4QEyCj Lbo0YpdtV6JQcKqRAQVPxu704T2mkneDhKStCAFvmFF6KC7RQJEXSEfIS5Vdj1o6v3Yx6MnmlgR miatsiOfp3CXeR8D/WGup7hlIxpDHLik3p0YYL+or74WfhLqvIeOWTTofbtyS6ttIzbRUeTRklt jA8uGUGox7pesQbtVO8L4zFQMqLD3V2QcEaqOKeeEEZojBzi5M5hSh7qOKYNmXDGW/kB/yHcYEM BOAk9kxoOgJK3gl36ylFCfwcE5PjkbzT8TcfNE X-Received: by 2002:a05:600d:6447:10b0:495:63f5:7a4f with SMTP id 5b1f17b1804b1-49563f57a9amr3600385e9.33.1784542154242; Mon, 20 Jul 2026 03:09:14 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:13 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar , Roger Quadros Subject: [PATCH v3 net-next 3/6] net: ti: icssg-prueth: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:53 +0200 Message-ID: <20260720100902.155605-4-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: MD Danish Anwar Cc: Roger Quadros Signed-off-by: Marco Crivellari Reviewed-by: Jacob Keller --- drivers/net/ethernet/ti/icssg/icssg_prueth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/eth= ernet/ti/icssg/icssg_prueth.c index 591be5c8056b..0fba22c1046e 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -1100,7 +1100,7 @@ static int emac_ndo_open(struct net_device *ndev) =20 prueth->emacs_initialized++; =20 - queue_work(system_long_wq, &emac->stats_work.work); + queue_work(system_dfl_long_wq, &emac->stats_work.work); =20 return 0; =20 --=20 2.54.0 From nobody Sat Jul 25 02:39:14 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 B7DD53E1717 for ; Mon, 20 Jul 2026 10:09:18 +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=1784542165; cv=none; b=N2VeWM7PWBQkz2V/xsipF6CSpxQe1gKwjWxZQQCLvE+2YgEGqW7v5ZhMKEUGUmX2/rcoIssOTh5ipupcmb2Hf1esD/fdokR1RNFyx3GfKg1nQObtUddYnmiXY0GLUOYz2mLciNZpwiJe/I72GkBDxRABTozXvTTiKCUZPeEBkFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542165; c=relaxed/simple; bh=MzHFCd0Tz4e+Edg/Bq9oVoskUFiz7gl+EF8d1HofN4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lfbkaNM8gtM+w32K2ZAFrcVFr6WbJ1JnZBX1bbJkRrnKAv6ea9xAKJ1BUmh+YEELU1AVwaSqB2s6UQhkxnPT5GaQF6U6HiGHySW+xDlTxXDpF1zqgzMTyjmbnv+qiOMREF7snHoQL9OiLntoY+owl8cQlr+/Jb4GpRPq4zFVG1I= 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=HzSbCXiR; 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="HzSbCXiR" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4921eed3fa2so76037305e9.0 for ; Mon, 20 Jul 2026 03:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542155; x=1785146955; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=oPb++nNOUKaZMzssqqTK7VRW9BEodDg7l0QT3ply1Lg=; b=HzSbCXiR/0+5O2iVMSZn8xWF1x7z3Cu4IKN9ikzzP/nQoO4pY1ga8e/BjEiMIBaupT 7CVDdIU6TsbsaE0SGipppwOy2yGQhYIX+CgVV3VWXtqFn8dIxECujxDS64a5OdImlF3w Hq8hWfjPHDzLf/cQUlk4xLyBK0oEhGscNH1rZX/bGccCK5aiEsN/2U/JY+2bpE7lRUVN 2a9+vhKx7VP+pUG0j0jalylNVOZR+GdykJrggr/qRClpdRld/NwdawE7yysqqNbr86Tc roChDyDuG9yAyTp7nF4gevTPFnLzDQdKvDrDkGb99Tw57DyJBJlIuL8Fshv9+ti6qnv+ qE7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542155; x=1785146955; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=oPb++nNOUKaZMzssqqTK7VRW9BEodDg7l0QT3ply1Lg=; b=qh99YspH0mEl40PW4VxdyMojN1qDfM5Icdku5s2L3dWFCu22gZnKZjk39XEgAJa9Nl pgyG4buOh3+H5prGlXbmHi8B/VdyysbqShHflISlBoKF1tNEBvhtxcwdKiqYilwnivUl lACIDgC8xyQ+/s7aC41BaMaN5fsj/W+mHH4W09f2ugJq5mxMqG5ux71XBQJmXrKhBkdA VbTlY7KLvdn7KsANDEJChXK64qUAHRkSpzTyLQ+G8etM7bdL89hAxMFPeKm2OaSlO+ox Up6QYW/36p3AIvQ9LG2TeFH0KCid7r5CdxZtxixGLu3Dk6fIcjOdC1NC9AJgEjfw1kSP CKRg== X-Gm-Message-State: AOJu0Yyn6HG44K70cHEfQ74RFBc+9qKPZyhh0D6nPjmTxW9KuvMTe25s SIFfTbpuKoRa49iEYu5sL25tyDMEIHLL/+BIYlcVwvjP4GGmD5A70azbKj+4ZFSAv6ccAlkI6AN 3suhpLjw= X-Gm-Gg: AfdE7ckAvgb7jXO/aVbeTpo0kxnSGQtnmZ5jY+91x85TPdDlQu9R93xAzt5AMIQdVXs 7oLR2UA20dp93bhssU4S0/SA7klx6joNfRSOcuY4qHIJp0SfdPW2ipX15Uzi812v149DVrWMLmI i1soLRUUgxjfEdtvRnk2C5E+FPkn0liwTcnU7ApF38fe5UtKKNUp97DnIwYTwTT02/a3na5ig85 Q7PWDeSW4nqMqcIzj7Y7aE2nSmBw0l+sTje4a4EAZT0buoF1xdFl9V78g0bwq3EIZ/3LgbYL8oy jSuFrsJoTOYTA+ZOOUYJMLAK8BiU2ipxLlJ3YBWQCEhNVkLrtbtcDbH45zvX2dV5D+pUj30KESb OriLl3Sn47h4QbMoZVNfw/3GhqQbKtnSVPdL3tt8sRkbruGcy6JmaHVG5n5ImhHvf7KhzGsx93h uL+JQ/e1bsRUkqJgaUI9d0Xw11hQ== X-Received: by 2002:a05:600c:4ed0:b0:493:c634:952 with SMTP id 5b1f17b1804b1-4954a3d0872mr146603125e9.7.1784542155280; Mon, 20 Jul 2026 03:09:15 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:15 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mika Westerberg , Yehezkel Bernat Subject: [PATCH v3 net-next 4/6] net: thunderbolt: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:54 +0200 Message-ID: <20260720100902.155605-5-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: Mika Westerberg Cc: Yehezkel Bernat Signed-off-by: Marco Crivellari Acked-by: Mika Westerberg Reviewed-by: Jacob Keller --- drivers/net/thunderbolt/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c index 02a91650561a..be27972bed18 100644 --- a/drivers/net/thunderbolt/main.c +++ b/drivers/net/thunderbolt/main.c @@ -316,7 +316,7 @@ static void start_login(struct tbnet *net) net->login_received =3D false; mutex_unlock(&net->connection_lock); =20 - queue_delayed_work(system_long_wq, &net->login_work, + queue_delayed_work(system_dfl_long_wq, &net->login_work, msecs_to_jiffies(1000)); } =20 @@ -460,7 +460,7 @@ static int tbnet_handle_packet(const void *buf, size_t = size, void *data) if (net->login_retries >=3D TBNET_LOGIN_RETRIES || !net->login_sent) { net->login_retries =3D 0; - queue_delayed_work(system_long_wq, + queue_delayed_work(system_dfl_long_wq, &net->login_work, 0); } mutex_unlock(&net->connection_lock); @@ -700,7 +700,8 @@ static void tbnet_login_work(struct work_struct *work) netdev_dbg(net->dev, "sending login request failed, ret=3D%d\n", ret); if (net->login_retries++ < TBNET_LOGIN_RETRIES) { - queue_delayed_work(system_long_wq, &net->login_work, + queue_delayed_work(system_dfl_long_wq, + &net->login_work, delay); } else { netdev_info(net->dev, "ThunderboltIP login timed out\n"); --=20 2.54.0 From nobody Sat Jul 25 02:39:14 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 00EC83C3787 for ; Mon, 20 Jul 2026 10:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542166; cv=none; b=dEqV3aozNzMTujxbkZm9/2G6cpx8VXeO70N6tWumZBcDZ8hPTBYP7EalCdDBUTlOmEObTTjDZz07Pt/CoMQg5EI97CHds6wc5kVr4IY811ilMYFLxcTukEpyblo4QcM4ajHv6TqbqZ2HceeZleo1IpM9e1qnktfEKd94dF1XFO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542166; c=relaxed/simple; bh=BWgc9Iyj2TcgxZPnjdFYu7FeDt/Ds9TPxXfbQE2PjHs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KO29/2vJToXDDFl2TgplS7cjFf6bKhC4buMkYW8FwYDNJ7PphqWcc8MTTeWyTFK41/GzFGnV1nc6xAtMAmcQT25MWuBQo1xNPDVqyqK4ni9+sSdgTOucqwf9z2RzNM+K9FO6CzkTFvI7ACM/cwFpVUmmG7EYlBMjALzbQoyD4rs= 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=aen+fRTP; arc=none smtp.client-ip=209.85.128.52 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="aen+fRTP" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-495437bb891so28220745e9.1 for ; Mon, 20 Jul 2026 03:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542156; x=1785146956; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=eI5+JB42wBJEMgs0lBBfnLbJuBx+ok4DAUzZO7PojRg=; b=aen+fRTP45fNLZ50w3MJuey0pnyDtn8fa5DFZv+n5tZHQoKaG1IYPEDG+zEFwnSi1T sT9KvdyQ+LQ5FWDgKKgjKrWaQgAN4ujbIbUmfsD/rsGia5FWAVdgLU/DPEVrv5H8ezY3 Y6YXCKEhY9vMGRIg0E6R0fGFmf9UNuGQZnjvun26on/7MnBeAV1DPt4WwzLmQCotbmb2 A+8MH5LPcB80eBpzVp/mUlypDdsDzgxo6n/5x7Y3Bq7nR6nIVwua3HTnqMNtN38MS1KY 5rjcE4/qP8sTdBz7q7F93fEt9v2CTRO1mW747aJzpWEy8YiCt81ESMp+0NzJD0UAtjyo ky1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542156; x=1785146956; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eI5+JB42wBJEMgs0lBBfnLbJuBx+ok4DAUzZO7PojRg=; b=OYk64aK2ZKF8PP0emnPTYdmbhgle1g4ddFTRWmWigxg+uZkc9bitOTQoyGEmcgEAQb Dw2bfgUnhVNL3bfsJi4cU2bgrkkEMJw6fS8nPPaYX0EXLTPcViChpaU4UjP3+EmQI9Qa v1/gpFphq4EWjP6Dw5KnZKy7OP+t6vIOYnMg3zK2rTzQQSFzc+deSyKXHE018UKS+8HQ F8geP10gKigkAxKx+HUD8Lqv94SUKsvbMGRPikB4vLu+RLGlAFreptY40kkzQ+aqQu5o 4tNanPFEmHD6FIrw2LSIV8PewJoATKzR+tsV+D4kBR/fivi6EagMj37AUKtwA1ka1j1O XI2A== X-Gm-Message-State: AOJu0Yyhesbxlk//NBp9TrvpvuMpDt3LcCS3mpBB9Dxg15C0Of/BLqwE qzeqabj69Atdu/UHIksc8SaCabZ6jK4uhVoe72+f1KnIxMcVnm78ftvGHB7zYJjg014cYrqneyr mEag15GA= X-Gm-Gg: AfdE7ck5gwhNHNZ3sBqOlLKyQnyVH8sXh3oEPUsFpaFTZO/ifPs6KlW0xA0e11RT4Xf dUMnHXGuTBbI0bZL6ZkouNUuPXy8t/niu47rSnUucWDHVbEq3I7efIzoTjcgUJjqB8ZS4hC89MD smnvLmWON7QlwsBAyzyzcQm25AMvVFOv/nWMQPaBv6Sr8sccEsrU5DmsMj/VqkdKM8DMn4vIwmv OcfaWUBpCl703F+8Nt8fXyfH+vL98I0Yf2v6of6IiROwnSyTMygAc7iLm4ZIAXY/Nj6di4CRN5A ZBqUIrIYCKF8exgWpD5vRBCXbupVbIMr0pzipMWRq4vg+DG9pr1A92+fIjrFzZYFMiBkYP+67+1 jHy4AU9yAGgBFWqdxSm9rbUPOB4UQJAmfm5UkQKdJ96+iNODHZfwSVgwlSUT48RCjy8hfpXBQBW Gy72ZkpS7XhoaCjF10CyyBHiWXtQ== X-Received: by 2002:a05:600c:3b88:b0:495:495f:bc30 with SMTP id 5b1f17b1804b1-4954a3391femr147130185e9.12.1784542156162; Mon, 20 Jul 2026 03:09:16 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:15 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Petko Manolov , linux-usb@vger.kernel.org Subject: [PATCH v3 net-next 5/6] net: usb: pegasus: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:55 +0200 Message-ID: <20260720100902.155605-6-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: Petko Manolov Cc: linux-usb@vger.kernel.org Signed-off-by: Marco Crivellari Reviewed-by: Jacob Keller --- drivers/net/usb/pegasus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 8700eeb8e22d..c1798e14b224 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -1126,8 +1126,9 @@ static void check_carrier(struct work_struct *work) pegasus_t *pegasus =3D container_of(work, pegasus_t, carrier_check.work); set_carrier(pegasus->net); if (!(pegasus->flags & PEGASUS_UNPLUG)) { - queue_delayed_work(system_long_wq, &pegasus->carrier_check, - CARRIER_CHECK_DELAY); + queue_delayed_work(system_dfl_long_wq, + &pegasus->carrier_check, + CARRIER_CHECK_DELAY); } } =20 @@ -1232,7 +1233,7 @@ static int pegasus_probe(struct usb_interface *intf, res =3D register_netdev(net); if (res) goto out3; - queue_delayed_work(system_long_wq, &pegasus->carrier_check, + queue_delayed_work(system_dfl_long_wq, &pegasus->carrier_check, CARRIER_CHECK_DELAY); dev_info(&intf->dev, "%s, %s, %pM\n", net->name, usb_dev_id[dev_index].name, net->dev_addr); @@ -1297,7 +1298,7 @@ static int pegasus_resume(struct usb_interface *intf) pegasus->intr_urb->actual_length =3D 0; intr_callback(pegasus->intr_urb); } - queue_delayed_work(system_long_wq, &pegasus->carrier_check, + queue_delayed_work(system_dfl_long_wq, &pegasus->carrier_check, CARRIER_CHECK_DELAY); return 0; } --=20 2.54.0 From nobody Sat Jul 25 02:39:14 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 4ED213E00A7 for ; Mon, 20 Jul 2026 10:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542165; cv=none; b=q6T2j2W8GtlknZF58jBBb7FI55IlS076g0YmWziyYuHQ57TzoQCfIZmGst1m2HdXNz6djttEPeP6PL46MjjtOW2Lc0HZqIMEgOSnh3UaFKnna2xSV+a2c2F7iwWr6qNMQwQamAnNeNgPY4JF3LfAZkOCMGHl1mGT6pIQ3C/E/RI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542165; c=relaxed/simple; bh=2viZWvH6/+46Pl78pc14Y4zP+oD7vA7rv2Yat9sU6W4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nrpjjqj6h8qh5jeEI/zJbHs+/+iZw8BiI/OuGVFcKMDi5T7y4TJYuqEheWanLA1P2BpTotRpx9qg4UL9TZTUv2I9azsGRi/BjSDFlxJq8XCkXcqoQPk624I4QFjBdINjyfc0KbSVObdJ5p32/We7bh7bqt5n3HzLqMA6C3azKMs= 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=FogLk1Om; arc=none smtp.client-ip=209.85.128.42 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="FogLk1Om" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4954dff6536so15839285e9.0 for ; Mon, 20 Jul 2026 03:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1784542157; x=1785146957; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=hAtyS+TPO1WR/0zgU9PmtjKVpg47XvcTOZ7PAzXPVhc=; b=FogLk1OmRUsLrFOvjzDodFQLXATR0T2TFEd0uiEbDu9uijhojWT4rjEqaqsdgEA2zR nyYmNcawuYDSh7B/pzBUTas+Zp6rK7QJxLUkKzXDEtd0eiKgobKK6cZhCXuWMVUS1mgn HwRSd+itzttpprUGqWGntLjxB9W4CcIszoYzMxtp58jvwXkZaqw+X3705ws3w5gSdj0E ha3mknb26ekaWg+FDGp8AvzpSlpw98yNx3bKv/YRL32x1m/DBXC4jDzWH+6lm9pfrQqT CyunIe/H/W7acj5vy093k8pdlJN/+KtS8lvdwdzFQE/4HnCJSaZhCMPJXwXBjLJrSoqg 0GFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542157; x=1785146957; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hAtyS+TPO1WR/0zgU9PmtjKVpg47XvcTOZ7PAzXPVhc=; b=GzZfukIk8tt7vIbwoavrbv+mZq4u3GDlTSrlA+cclzKSfGZ64E3LdfgzLLXOzxG2+n 02Z/fxhrfZY4XSoD18ubrBmN4I7D+AuglqsKYK8S1smauU87zO02QFnnQWoStJjtlohL a7mfL5te8fyEyu8Q+ku9rpJyzo7l3kNry1j/T/BG64TrXi2fFoHQ2GJB84nAt5/25adr RCSQDwqY6QX/UzdSbeiUG5LtWo0sJfY9HEvjHUTpjhjI193Py01pETJqRQO3QlY6Z5Ty /z6Cwg1DWVLg1LXG2LDuEgLy7LJChwB7Sc3GlkhDMfShiXw4KGNZ+jVtX5KH3BQsBFr1 cqTw== X-Gm-Message-State: AOJu0YxejCq2I8aW1aAW4KJ+ybp7v8SYsq7BDPcQfT/O6FtHHSRNfOgc +oQumm4J2/8C92xwuFntqhUIxLOVotXP0jhFM5ahr0IlWVGtFdfg7wVqVE/GkAqDgRu+LKPaaLA /aXyNbZM= X-Gm-Gg: AfdE7clnX9NHYVhwOUKoVZZxY8mQk6Lx0EF6EcwFTuMh1WvBJpw5jn0tKHyWfxFkSTf FWYCZd33y7raOvvN9LxLLwvLSScaqgb5u98PQ4s5s3T6fVrtEsuO+YmexY/WAr66KOm7ZRY0XVf Ur3gEOUdjmQT9KazrcmMwK946Crz0Rs7qwpcrCoT1laMro0NULsc2opdH00vtKpNx1sRFeFPK64 Fp+Sg7NXaw4C0bsu9l0898czAvkQJItc+llztgix1RjY91V0gfKxQMteAQeDU+0Ry4nbEIdVVJD pY5y/giPSoPVvz5R3k311SPLhhxxC25lmWiKvLf2C7J88xDaUBAhQ06v7mp49XIAYU6Gr8AdU0E C+GHw8ZnUvOT03QUb6qvqtrEaxMXFZ2N1kY0b3IcnZFE6trYlfooKPjbV6iqP6We0Rtd7/DDKFD mBhbT3t2k4+7FKLX+GxJHKWrwiWw== X-Received: by 2002:a05:600c:19cc:b0:493:b877:fbc with SMTP id 5b1f17b1804b1-4954a402fcdmr171968805e9.21.1784542157209; Mon, 20 Jul 2026 03:09:17 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm294792995e9.2.2026.07.20.03.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:09:16 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ethan Nelson-Moore , linux-usb@vger.kernel.org Subject: [PATCH v3 net-next 6/6] net: usb: r8152: Move long delayed work on system_dfl_long_wq Date: Mon, 20 Jul 2026 12:08:56 +0200 Message-ID: <20260720100902.155605-7-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260720100902.155605-1-marco.crivellari@suse.com> References: <20260720100902.155605-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added: =C2=A0=C2=A0=C2=A0=C2=A0c116737e972e ("workqueue: Add system_dfl_long_wq fo= r long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: Ethan Nelson-Moore Cc: linux-usb@vger.kernel.org Signed-off-by: Marco Crivellari Reviewed-by: Jacob Keller --- drivers/net/usb/r8152.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f61686433031..f6af66f294db 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -7072,7 +7072,8 @@ static void rtl_hw_phy_work_func_t(struct work_struct= *work) =20 /* Delay execution in case request_firmware() is not ready yet. */ - queue_delayed_work(system_long_wq, &tp->hw_phy_work, HZ * 10); + queue_delayed_work(system_dfl_long_wq, &tp->hw_phy_work, + HZ * 10); goto ignore_once; } =20 @@ -8840,7 +8841,7 @@ static int rtl8152_reset_resume(struct usb_interface = *intf) clear_bit(SELECTIVE_SUSPEND, &tp->flags); rtl_reset_ocp_base(tp); tp->rtl_ops.init(tp); - queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); + queue_delayed_work(system_dfl_long_wq, &tp->hw_phy_work, 0); set_ethernet_addr(tp, true); return rtl8152_resume(intf); } @@ -10295,7 +10296,7 @@ static int rtl8152_probe_once(struct usb_interface = *intf, /* Retry in case request_firmware() is not ready yet. */ tp->rtl_fw.retry =3D true; #endif - queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); + queue_delayed_work(system_dfl_long_wq, &tp->hw_phy_work, 0); set_ethernet_addr(tp, false); =20 usb_set_intfdata(intf, tp); --=20 2.54.0