From nobody Fri Jun 12 13:56:43 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 301C43DFC6B for ; Thu, 14 May 2026 14:25:30 +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=1778768731; cv=none; b=NYOFiSP/sscjFKltGOt/bUpqVprC2PbFKIAwc786FuqaUv9SD+6GxerLWgNKcbwQjDIJMYYZBXnGCYvq8bgO7sacaZS4F3+UhV6mhV0mSPQI4n5zgBpNabPH1BmPtsMwByNj4gA9WFuw6vtjo+HIMNqRlkdcjDWm3PYyAVRjD3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778768731; c=relaxed/simple; bh=2qiZ3D8/x30FAqHO4UFNETv/Yp7psnFt9mDHoq5Zo5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GnHKtggp0VP72OG6dRQ5O8QW4IAsGLnILx+y5ebhjT0EnbPvFkQzVlzZRuWk6BNXHeHTPtjrtxFKIger4D31pSYIruwYaJbVn5zY+pI9aEF6adXXo1qe629YmeTmi0aiRGivCe0B82dj2lSDSlrlal+7IIXoE3KdUPddcUFHa5Y= 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=cFKgtoup; 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="cFKgtoup" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-48e6db3ff7eso34153545e9.0 for ; Thu, 14 May 2026 07:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778768729; x=1779373529; 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=0rdjMEa8HXb1DckTrt1qXkiZJtpPbgucbfsGntj68F4=; b=cFKgtoup213xzS2TQzDXhlcgIJa6+ke/7dwS8NYIFOdkUh7d/bhfrFtYhW7S8zMIpY 3EsJgFD3kn+bQg/LQJRR7w4TwV12Tl8w8UtH4hAEafRs4xj+gHe/HenbTBPKqrHDb9WE +ROpRRSPVh63EA6H02e9XghYsaH3qwLEl/p7jTrvZ9RhEnItv2MbFLmkGY53rZOSf8zt 1RGME5y71884xNIIG99VDf1OYOcAdD6SyX6s23UgzqpEhl/VwbYAv4TF7JLHeSMWoSJN 17j6OuDGztGkkCNRgbkdlrn5cFmqiX9VV4MafOMgIvF0jShUlFg4PvSLi/ejFdBFrimY 4Cyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778768729; x=1779373529; 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=0rdjMEa8HXb1DckTrt1qXkiZJtpPbgucbfsGntj68F4=; b=IDmdZEVfOAHuZ45d2eOjRFv1PgAO274gE5hMds6WLz8FSajiGF7yHcpeEkJ3CGr59w uWwASnkSlx3F0YDFS4miAIc9GmzUBy/QSGcZBqvdQtutjYXziWRi7yhI2KVbbBYg1prr m+TZvQszRL02rFYuQTWz/B6DBrf1qwW4xaXfHOtlzbaWBERTq+Vx9NM3BTKQV/Y8qIAx OZd8zxt30vqhqKUvzEyYIPg7oxl0FmuDsVvxdfl2k5W1N9M9tbto0HsUN5FFP3DjLZ0R FihjzXkz/kc4oQaa8fsPsEtFfrlDebpvWlXtv0UtbNgJTXYsW5G+EezbEyvW+euShfDd tLGA== X-Gm-Message-State: AOJu0Yx4+68bv3wURN+wzeDARkv6wxNPxhytMwgkuSvnq+2jxTvr4IIe S0iY6vFscwvdpGdjd/7xwqefEle90K9JhB257xGdzaRnG/ShHajyY7VFgSgmXu2PTsvRTAdps69 Dmkys9vg= X-Gm-Gg: Acq92OHIZg3N+it95n++WM/8oyNEgjDgKkHzMqmjvXLUIfpD/NHHFxFQbgaBneO78CP A7sg0OABU0xxRjYKnlkkLQo6rhLkpJcVxSM5SpFWrd2o4Rdw3Bk+kWypDBsKBiFhgjorVlLnYAI F17UAZFPNvjfVnm20X4LYOyTJOBclg1vgQzt+IkLoXtjIXTQaTSwimpYpK6GaDrLDfldPGuz5sK JjO6kNpvQlc7m1vf16HslsKNPG+ZAhnPRL19yV9BIBJTpX70WXBpUpbHK0Ltic/eWfCFRMZYNh7 kwrfqREiyTTd552QUaol50aOd9m1xQcylGvFtQL2LIset5ryUBVx8Ld0Bxj+e/ShdM8XhBM0cs4 cCWc50VslPvBRbKswStBDnBGEClHf3OLip8DCReq3sxElCIw5fIAe/JwyDvz2Ch3oOJNU4FXbhR dKNT8ZFqHCFJFoveyN+PF4DsLz8SrPdJ/SJhR2VuLXaaviM4ye6tMIm25T7A== X-Received: by 2002:a05:600c:4206:b0:48f:d1b8:9aa0 with SMTP id 5b1f17b1804b1-48fd1b89f71mr60671575e9.7.1778768728597; Thu, 14 May 2026 07:25:28 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fd62e0da2sm21235005e9.7.2026.05.14.07.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 07:25:27 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Subject: [PATCH v2] thermal: core: Add WQ_UNBOUND to alloc_workqueue users Date: Thu, 14 May 2026 16:25:11 +0200 Message-ID: <20260514142511.325446-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 This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by default. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn=E2=80=99t explicitly specify WQ_UNB= OUND must now use WQ_PERCPU. For more details see the Link tag below. This workqueue has no benefits being per-CPU, so make it unbound using explicitly WQ_UNBOUND. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- Changes in v2: - "thermal_events" workqueue has more benefits being unbound, so instead of WQ_PERCPU, use WQ_UNBOUND. Link to v1: https://lore.kernel.org/all/20260514132901.275477-1-marco.crive= llari@suse.com/ drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 2f4e2dc46b8f..1ac4262dafbc 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1889,7 +1889,8 @@ static int __init thermal_init(void) if (result) goto error; =20 - thermal_wq =3D alloc_workqueue("thermal_events", WQ_POWER_EFFICIENT, 0); + thermal_wq =3D alloc_workqueue("thermal_events", + WQ_POWER_EFFICIENT | WQ_UNBOUND, 0); if (!thermal_wq) { result =3D -ENOMEM; goto unregister_netlink; --=20 2.54.0