From nobody Mon Jun 8 23:56:40 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 3505E2EDD6B for ; Mon, 25 May 2026 07:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779695349; cv=none; b=HQukgdfXIHnrxFvjbd9BOMcBOkQvK/ygC17tqP8ZXpCJcYvfp4+EVqjFjbRWntimOGxLmtHhVWfj6AddhE//uK45Xi1KEE1FadPRqE9r19pitMxbLz5RmWOGBJDGrze8xVeK3x/mIWlEY6+8ZGaSGYj/cSUTfE0+WI67UEBhTRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779695349; c=relaxed/simple; bh=XB4lqGI4TSEKr7HutwRFVw+O4V68/BzJkILYBSzPNW8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=boieq4r3HbQigm1lcXNJ0a+IAAMWKAL+Pj0ttZR7Z6KiTbMgaTTcT7qUxxVGmgLo/GHy3BNC1oRe7AHmToaBu6Hc9Mvd0Axqxfj9FCZFdx0L56jZ+FrTcJuyysQNoL3Iy2MFutL618pHJzoDS6kqC6MbtDWsn0jtcs76UYkyvYE= 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=U22LdwxA; arc=none smtp.client-ip=209.85.128.46 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="U22LdwxA" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-490426d72f7so25552375e9.3 for ; Mon, 25 May 2026 00:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1779695345; x=1780300145; 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=rBc62St65Dxp5xby2IpAADwN9N0qAgn4Yir0PPkerBE=; b=U22LdwxAKxJVv94f5JZt/EDTQZSqkGq8zKgLxvJgmeMRjjxhVdy6PW28UmhNmhlTMi 02yfPA3fevh/4B9lu1/Qn7uk2FsUZns3l3JpPXdnvrlUSTKHqg9eXn8SmEed13uVYeyt 1Pxigc4QPurnk8M5Km1LNlXAhtkEbUq+KjyEMU8Bilr8DPgP0DHgeAX5eR9Vo0siGfsd w53xwEvY86ctHftfC/TSs6DB+L1RaJ8/Pco8hiVMkh5I6gdSL9gRqSheKjbc0QDs72pH 6xg8WSUNnK4Gr8VR6fu+mfBJxFKoZyf4GsF5yO99VKiQYzR0A9wxWwzyOadysCwNf8Y7 MwDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779695345; x=1780300145; 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=rBc62St65Dxp5xby2IpAADwN9N0qAgn4Yir0PPkerBE=; b=pPg+2wQVEzXQLjd3IywmWVavB8Q84RKV1DqXY99fKaTnQhCGwWhpIZeG2xqqqxMJnZ YDkQPDMLKVLwxGXzHQWhk1y5TTDzZnzEhsQrDLE4ZNeBb2cQsQu+sKid1KJSPv+wa0L0 7KufArQCOr0oYKGAtGzbSnUvZDKH9RyV68AiHg1E43BZhse4ehjycjGmYf4ofe/Cdl2U BG/C8YgN2+5/bN/uu2Kh0CT0J2nZVqeWysKSs+F1GRHmSzKVOM6gqyvT4q4o3U2AoAz1 PuLK370DS8wG/HJes1uLSxD/23nXvizz8Z+IN+aB5Ibn6Y5FeeGDrE9xYycq482GwEHm LafA== X-Gm-Message-State: AOJu0Yw/PVTrgEfXA07rNo6Wzb/Q4G7iDAjoDem/+9NKx2G9LlN9b9NH +vfC6vlgkSM7TnOq5qe6mZw0X//37Qaax0OmRg64C98hMvzhNXa1qzDfIRj+7nHIEMuwuoiQyAd 1LBm0ZTk= X-Gm-Gg: Acq92OEAdswPj6qqbvIAb8a+J2tCGkNLh3kXSh6/lUpLvQcF2X1v4OaRA5pb6qSZ4As edDPHd7CtujT7HQsgKgc/RgKY9uE6qwhaEi73/UB6Y5rZ++Vl228IewG7zHt1jo9UOK6092MIT1 7BAk7vNtetbV/XKmh1ItENenDUdRObmF/nqAqIBUnkGK3Ss0R/Xp3e+nRzOskcRP1c+zVAEwRih mL/UX2ZjBrHsqn0NpFGb4iNR6ec6RsKdVD5joxfqy/exhLVECTG7lQDM7gwBS4ZXJmEUa2lmHkp /8ryNMLaJ4GTM5dvgI6jC4UCpHg61UPgfzU1XtoDJmxqjIY/aMSPtix+EzVfAD7rjcp/hsXRnrm 8/RL7Gemrop4pFiO8FnvlkSUNaJSc2tBZZJiIAOKL/ZPlJAfWT1ODrkZS+RsUdLP8fTUx808lPn Pcab8UKPqmhVg3de85Zcs+SaJRYGd2kiSpRn3j2sC2pTMaY1pugBGJwtCufg== X-Received: by 2002:a05:600c:5298:b0:490:778:4fec with SMTP id 5b1f17b1804b1-490428e02d3mr224369285e9.33.1779695345627; Mon, 25 May 2026 00:49:05 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4904526ca21sm227032725e9.3.2026.05.25.00.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2026 00:49:05 -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: [PATCH v3] usb: typec: ucsi: Move long delayed work on system_dfl_long_wq Date: Mon, 25 May 2026 09:48:57 +0200 Message-ID: <20260525074857.30816-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.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 v3: - Removed RFC prefix from patch subject Link to v2: https://lore.kernel.org/all/20260508143853.330151-1-marco.crive= llari@suse.com/ 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.54.0