From nobody Sat Jun 13 07:49:52 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 B34243F2117 for ; Fri, 8 May 2026 14:39:02 +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=1778251144; cv=none; b=nql47huh0RNYlK5LIdNrpSf7OwZg2E9LB73DdoCmMcD2jINJV69I/x2C/whjpgt4+OYWAkGlgzZDAIHXNTvKGyulk18K51FUu1RjVr5i13n02WqWqeSUCg3Jbmpii9sshdArZl4VjlelCrT98R/X6CQBE0/Q2ulTsgCUne3Dvxc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778251144; c=relaxed/simple; bh=T10SQhavWcGG/lNEtXVc25anuJk1a7moR7XrgnhDye0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UW5w/r9p8Xb7YtT9ap82Z73fEu9xNaCvCwi5CWobQRz+O2OhdZaWQRuCwXM+AZLlssSs7sBPBJ1OwiE9fujDKmen3Rt4bX2if9HiKwlEqhuqLElcG77TL9aIZsdRk4u826pYR42RzhNlbSh0f4POz5dig0sSovedrvrAjXRrkNg= 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=PgUcPMbh; 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="PgUcPMbh" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-488d2079582so23048475e9.2 for ; Fri, 08 May 2026 07:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778251141; x=1778855941; 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=uW2iRmBjQmuAIZiFC4eEW7XkRDLNs8lq/COhCGovlN0=; b=PgUcPMbhhj8LJ8Ivc5Tx6DboDjU08YprQlVelBlLGeXsLpLIG05yBBPruieNM/0E/H +oibNjS13f4oQZXp7BMJhMY5Z5XsV7pf7mwwNeR6M/ibAskj0J8RrCln/KshLXp0gxbm t7kgBPF12BCY+cArMXhlcfj0SqGb8Hfdxd9U6G2B0qsHwffzFPFnqyhtgANhKUNDJIBS nDXdHDuV+uakqcKpdSHDOa9iMP3OJOXlD9difXIdd2jZZ5k4xONFf6iwtuXweEICDx0I 29F8VxMNlPjM5JHekjd466OD8cDdvZgCscBzK1NH2uma7/Pb6q5OLucXthvQX8TgwV5J wR8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778251141; x=1778855941; 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=uW2iRmBjQmuAIZiFC4eEW7XkRDLNs8lq/COhCGovlN0=; b=Vrgd7CUcdEKbmFNEPDrvouS2L5gq5So/l2PgBi9t32ZsvCsgZi9DnTac6AKDzv3WBB Qeki0MT9noaWpOUlC4TbjzlfqOw74oDuFDxbu53Q7jyWoiBssSliRV+9PqMKPkfv1pf+ LUpnFmN04dnKwmO3njSeB2SeBrvzTLROejOqar3Oz2DLlltLS5gOGG0L8/le8jDaxixY rs0MkXQzuQ45EQLYDqAU4bDWz8+U7LuzNPLqc6KyHOnx6vedia3jSWlI89/bYvoSYE3G 7FpQp2ORh+yUwnnXcGtKTsHP5UKjBA43pENPMXRSuMIIGJ2G/4wUiHjTudqV8t/yhYsR orRQ== X-Gm-Message-State: AOJu0Yye6tYwde1YtZPZS6E2UsjbXKqNDVLhRVfipWhay+51+N7szIYV 9Cwx6d43hiif11IcWmBvQTC7ZJo6muCXS5M2OwQAswzGplrZqWzmuQdwSThcTl18xwcY/1gw6kp Tc+2K3MA= X-Gm-Gg: AeBDietn+F/DjRq3eokZO8dioYzsK2S9YKSujEcc4byrmtkDVaPWL+YbVigEaEQx4ff ibdpT95f5BlHk6O6Qb0BzSusEdoGt8X4WAERnsgP0vB4jGdyqF0HiJ/bguZF0gRn7hFdC1BGURb tWO6XfOh/OWtEl8Hlfjig7r3/ZqHni9cI3Hz8qiTbjYvWUXgl2FDZSybMRw8VXjRES5siOsBggQ c+gnLw1f5V7e/S3wpV/3ZzFUoFdmJvTgLYQiSMvn77vX5Aum79UBHYnjEaiR6d2ki6xrR24XmOs X25V8bgLD4vNHPHo2uSDEz6yHELzDYr4O2juUvirXRfjhadTFmRTaTqVaDdIzcsKhealHIx1nzk L5qlrnK/Zho7rRsJ4vK9EHNInCOqI9AY9qN7bCfOqtW7k2DHVnWutAqyiSPidxXJZnjoEXOlNz3 7ryhv20Dyj73zLr64ZGZITKtadHkV7J9mbpyiOJ2ZqemOBopY= X-Received: by 2002:a05:600c:35d2:b0:487:4eb:d125 with SMTP id 5b1f17b1804b1-48e51e15589mr216236425e9.9.1778251140846; Fri, 08 May 2026 07:39:00 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e6dc09678sm610135e9.0.2026.05.08.07.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 07:39:00 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Heikki Krogerus , Greg Kroah-Hartman Subject: [RFC PATCH v2] usb: typec: ucsi: Move long delayed work on system_dfl_long_wq Date: Fri, 8 May 2026 16:38:53 +0200 Message-ID: <20260508143853.330151-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-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. Signed-off-by: Marco Crivellari Reviewed-by: Heikki Krogerus --- Changes in v2: - Fixed a wrong change regarding system_long_wq used by queue_work() instea= d of queue_delayed_work() Link to v1: https://lore.kernel.org/all/20260507142726.331206-1-marco.crive= llari@suse.com/ drivers/usb/typec/ucsi/ucsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 5b7ad9e99cb9..20fb1fbc5a7a 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1985,7 +1985,7 @@ static void ucsi_init_work(struct work_struct *work) return; } =20 - queue_delayed_work(system_long_wq, &ucsi->work, + queue_delayed_work(system_dfl_long_wq, &ucsi->work, UCSI_ROLE_SWITCH_INTERVAL); } } @@ -2109,7 +2109,7 @@ int ucsi_register(struct ucsi *ucsi) UCSI_BCD_GET_MINOR(ucsi->version), UCSI_BCD_GET_SUBMINOR(ucsi->version)); =20 - queue_delayed_work(system_long_wq, &ucsi->work, 0); + queue_delayed_work(system_dfl_long_wq, &ucsi->work, 0); =20 ucsi_debugfs_register(ucsi); return 0; --=20 2.53.0