From nobody Mon Dec 1 22:06:10 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 D26AE332EA0 for ; Thu, 27 Nov 2025 14:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254507; cv=none; b=osULFpp5H+LSxxxyiyIT5VyuxPssXzYdTButO6/QWGMROpQhmaY88dYKZ3qB8WUsXyJ9La8Sldn8Oya8aVwXIIAmYmR9obkUDvNADin2QMkNevJIW3F1ONXfOv92UO7IE1U3rgDqgX0DlugNI3UrsDQ29VOcvzbmywCXnjbUiPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254507; c=relaxed/simple; bh=a05l+xjPnkH2tclAOQRwbLGIvzoRBjJJTyLWxQjwHaE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tzgp095aDNBUAiGSQYhqmC42aT57T4Tk3nBEchEEI/gHXxGx7ufPCoaW8uQOTFstAm9kKDcQdxbgWhGYRfCvQKUva6aHIM+c0WdSzvEA4uE+81jwglq8H9DFiwXvP6FxCGmJcYhhtISVbeZVYnpghx6Ih6AQeC23gu2hlcDU8ms= 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=e7bk+74r; arc=none smtp.client-ip=209.85.128.45 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="e7bk+74r" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-477ba2c1ca2so10312465e9.2 for ; Thu, 27 Nov 2025 06:41:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1764254502; x=1764859302; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G8zESVUEAodlwzxoOWrKR7D4lrz2pYYL4sJuFsgHQDc=; b=e7bk+74rBxFWwOxhjhXNcVj1T+Q8GMdJkUaKcIU5Vzu8uqDS4MWZ6+qPP0gNahY5i3 Dpt6yarFW19a8KPBUMrd7Z01DNfcrme3RVm7xjImIHhZd8OOLExdcitOSutpLBbI7Rr/ fznQgnI58ukwlK3Geq1Xa9lwXcBpNOro3+pzKFTdpDhADhJzjUYppdEAklvcsGH6MiQQ WAILRh9HqJW2wGVuBLds5lScw9HAQhh1LUh8AC0M6tI6C+wIqmBAfFo92f715g63clV0 oYbZ11+wTlCuNNYkv3HxvTNDj4doZV6ulYOKVK3Kt+RmcpiFXMM+9f5kQs+YC5jRM6XJ y1gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764254502; x=1764859302; h=content-transfer-encoding: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; bh=G8zESVUEAodlwzxoOWrKR7D4lrz2pYYL4sJuFsgHQDc=; b=YWbv8fEMzdgRnlbJeczZ6LBMUoyTBPCOlEkm6mNx2DTaGZGtzWEy4jGNLf1TeNPxhP 3pznlL4A5oBy08nloreZTKN6dyJUANOgzWC3Jy3rf/Xwl0UTkaubRjSxDPMAPKzzCIUg Le8RxGv/rA5JyaGxDfaScApzfbyviljmXsAgXpvONCawZfT1RTZ450UWYL4kN+zu+RuJ GF1L4xjBc/UZEWLoGYXQezhOefq3oLHGtK4CZqgHndAwXG2mixot+y2KrBFbBnWr9DRC 4F1UddNUWI+ikYF8FdNKfXTrflWGoQf38rjXSYYTmqloqDA+CKp4MJbpRuLZnVV1zSyO CBFw== X-Gm-Message-State: AOJu0YxVJKDQz6iPGIpolA1XIBiP9zMMnoewqWA6coIqdyTDKAUYbe7s CSvtzPokGxpSOUe76n+w3I/CIeqgk88oDxUKA5Yt2lc1e9BdbhqZwbM1IlZhTliDk+UDLZ00+UX QBem1 X-Gm-Gg: ASbGncsxg2ajmL+gNUc650UgDgq8FCOhsjkt+ZKZSQmKKeLwRYGhnHKbxN/6f1wx/uT jsO7FhBpHIvvqHlNHAOVvVgseyEXRc7bmFHgxn10EaW42GJgpLlj1aeFeNbZ+MdVkpAwMBBEQ9i M/iGSx7ce/P6/1b/wnn65wmpqRponVB28XQ3qCTpL2R+Y+120k4u1N2a8IgfrdsMKkduFgIagg3 Xwk3me6LvMT9RK9gHp0JfTWg72nDVZPE64zP2kOmraSLLGBUB5mA4MKPW6uzuZfoTWqQ2okVozO oehYCwK/N0oIkswD0oXwngKihT+y7Lmly2ipeIPCZtCh0xTeQ50LcDd9gCFLCXAs8iz0lG/ySp1 HGm9LqlfCAQ4TrYlYQC1CLTiUGmMUxf4yAepxcNXHIoeBbZjmn+voGKpv75BBZHxTl1faNOI96D +kITAVonpAsHyn+VwaqFVM1z5EgYT3WRipwA== X-Google-Smtp-Source: AGHT+IHhiLO3LNoW9TfkmFdBrPy/+jNq9NtcOJURTcSkG24LQE5dIfyVQSe1Sq163XuRQytFHVPHBA== X-Received: by 2002:a05:600c:1c27:b0:471:13dd:bae7 with SMTP id 5b1f17b1804b1-47904b2bfd9mr114591805e9.30.1764254501890; Thu, 27 Nov 2025 06:41:41 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479110b6da9sm37351465e9.0.2025.11.27.06.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 06:41:41 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Maximilian Luz , Hans de Goede , Ilpo Jarvinen Subject: [PATCH v2 1/3] platform/surface: acpi-notify: add WQ_PERCPU to alloc_workqueue users Date: Thu, 27 Nov 2025 15:41:23 +0100 Message-ID: <20251127144125.233728-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251127144125.233728-1-marco.crivellari@suse.com> References: <20251127144125.233728-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 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. In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ --- drivers/platform/surface/surface_acpi_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/surface/surface_acpi_notify.c b/drivers/platf= orm/surface/surface_acpi_notify.c index 3b30cfe3466b..a9dcb0bbe90e 100644 --- a/drivers/platform/surface/surface_acpi_notify.c +++ b/drivers/platform/surface/surface_acpi_notify.c @@ -862,7 +862,7 @@ static int __init san_init(void) { int ret; =20 - san_wq =3D alloc_workqueue("san_wq", 0, 0); + san_wq =3D alloc_workqueue("san_wq", WQ_PERCPU, 0); if (!san_wq) return -ENOMEM; ret =3D platform_driver_register(&surface_acpi_notify); --=20 2.51.1 From nobody Mon Dec 1 22:06:10 2025 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 5D509333456 for ; Thu, 27 Nov 2025 14:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254507; cv=none; b=WR8s+JV/jdZ8ilyGUB9Ygl6OnfZP5+qR/gUYulwaENODyqW+qbdYHihIPzSO57qCUdWHyxC9fMwdgm9TJ/OkPF7Ua8ZJHYxyKplgtbBrAwGgGNXje5bbMUGf9GyodA8lNsG4qnxjSDeVxg3Ldzsjr0nJhy2971FmJwUjdXltaaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254507; c=relaxed/simple; bh=DGTGbzKydnekt3uJ/EMCQTdJL8P7EFEqykjlAHEO0+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s5qC0Oa0MMwGr3fjSd2DCalZ5VPlPSpTDefNcEZJYyogdq+6d1uPxehbER6QVZBSgnMut9aEvqxyMtFrNhS0AETXNf+4rREF5kIB+gsU1VK9TmEw2Lnn0TvjMggiDI13tpW5VuUKhNrF4QsQbjNLk6Y5zS0QE2jWmehKAaGSVbc= 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=Q84GUErY; arc=none smtp.client-ip=209.85.128.51 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="Q84GUErY" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-477a219db05so4645725e9.2 for ; Thu, 27 Nov 2025 06:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1764254503; x=1764859303; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WFTw99QutH3DAHx7lo41dcD9dNbkV9nNUON1QxtxjDE=; b=Q84GUErYgu8ixEvRMR0nYtWZ1zxLk/Rt115b0CaIxrqoEl6Wv9/WEOVoIAlAorKF5v mX5Wi0W25X0/LTMeHY7q1AY1z4NEnrjc4nAqWKeOZCbdzyx2cq3/hwQ9YoQIY1YSF42o qLF1Gf9sQMcVXU+x/LmbNfilLp/HOaTANN4P9IlwUrsiThCfKaVEIYWaciCECgsb3MeT ggHFBUGGllje7Khy0OqsrGJdl7KQA9BUFJEEpGA6x+ObmW0bkG3+49sEvScQHVo+oW1d lGU9/W1qxP6vYHjewqrq9VnO6PcWVbeYYpiR1ZaLA9lkLlDLLHLNs8N/4uFWgdVJpaVa sEfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764254503; x=1764859303; h=content-transfer-encoding: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; bh=WFTw99QutH3DAHx7lo41dcD9dNbkV9nNUON1QxtxjDE=; b=AoenZ/PgBR0Uk3FDKEKKJ1D6cVFWFMpCujSkC84raeK00+FmfsU9zwP4h+lmrQJtQ0 uZ44LiJosnDsd8Csg0vcp6jz4KVBgQeRBrI9IF8kUE/FnUyEpRHlBSAy2AyPqroRH892 /XX1CaDdB8SdwnwsQlrYT8JkaBJNC9alt7+UfLseG1xO/TE8sZZ2QDFemhlsDrRRuJT+ xKtWowohpEXeXZ10Px0EOaM5hgB3e9elo9HhixaOmpknpcFnaXTtyBM47vsie4cEnopu 8Z1O7ZY8wF3PPD8d53PhyHDb3luK7XyWY9VZBKkNdbbCoDv4AUuG7FZBJbi7QRDxcWOl mJCA== X-Gm-Message-State: AOJu0YzsNhhgYXpV/lehcwDdaEf2lcjS0OouzfN87DbhPcRsi9DTre9z g5TcwpiITXkwn/MOsvDWD7DcVycNJBvTxBxHSl6qq392ZP+VtnaUEp8MhJluLxuD8rbI1rGV3yr JjSr0 X-Gm-Gg: ASbGncsdxR+jMIYhL+bQe9UQYVoEKOybFGq5K5zDckCQJqxBP1F4ZhulO3pDQ/PwMp3 DTNKWV74zOgL3QKJlyU811wcSc1Y/6a9DQEgl6N1nrQXEDVJTzvr5pm0PrHhn22gCiVSV3BNvXR nuC3lUg03mbFwjilRhtEPTLBzkPZyxZhKO3H7JEyZ/DXC8czjoXBdWVx2rfHHilvPGeH5zv5JFp B8X2a5SxEsdiWE5gasFg/UM0q6kp3GItUxNE+OURpIOJZQGfTSwRIZiKxXo39dtC9N7fZQSDb3m +W6GaJH1v5ItfqWiEDIso0wP35YKsLFA8ngV+prjCX66Il94L+6R+sBYyR+Kp+2PMdicF3iVTnm K6F00pqsr0OpOrJChIhHo4eQC5FygI2E1Reanal/WQQ2vxMqETZJFxJW3t1nHLDT2g2V4SIwnxr XEoDb4LNUkpMkYeOevhjYEHpWJQzK8x3WmLb/3Fsgi1OQ6 X-Google-Smtp-Source: AGHT+IEoav5mPX67GfE3cqAErw5RFXLYdv6KEIdh54PkbMtNJOQdLCLrtOH8pJr2AIJGwUIf7TFRrQ== X-Received: by 2002:a05:600c:470a:b0:45d:dc85:c009 with SMTP id 5b1f17b1804b1-477c10d49b5mr201413185e9.10.1764254502871; Thu, 27 Nov 2025 06:41:42 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479110b6da9sm37351465e9.0.2025.11.27.06.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 06:41:42 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Maximilian Luz , Hans de Goede , Ilpo Jarvinen Subject: [PATCH v2 2/3] platform: x86: replace use of system_wq with system_percpu_wq Date: Thu, 27 Nov 2025 15:41:24 +0100 Message-ID: <20251127144125.233728-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251127144125.233728-1-marco.crivellari@suse.com> References: <20251127144125.233728-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch continues the effort to refactor workqueue APIs, which has begun with the changes introducing new workqueues and a new alloc_workqueue flag: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The point of the refactoring is to eventually alter the default behavior of workqueues to become unbound by default so that their workload placement is optimized by the scheduler. Before that to happen after a careful review and conversion of each individ= ual case, workqueue users must be converted to the better named new workqueues = with no intended behaviour changes: system_wq -> system_percpu_wq system_unbound_wq -> system_dfl_wq This way the old obsolete workqueues (system_wq, system_unbound_wq) can be removed in the future. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ --- drivers/platform/x86/gpd-pocket-fan.c | 4 ++-- drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/gpd-pocket-fan.c b/drivers/platform/x86/g= pd-pocket-fan.c index 7a20f68ae206..c9236738f896 100644 --- a/drivers/platform/x86/gpd-pocket-fan.c +++ b/drivers/platform/x86/gpd-pocket-fan.c @@ -112,14 +112,14 @@ static void gpd_pocket_fan_worker(struct work_struct = *work) gpd_pocket_fan_set_speed(fan, speed); =20 /* When mostly idle (low temp/speed), slow down the poll interval. */ - queue_delayed_work(system_wq, &fan->work, + queue_delayed_work(system_percpu_wq, &fan->work, msecs_to_jiffies(4000 / (speed + 1))); } =20 static void gpd_pocket_fan_force_update(struct gpd_pocket_fan_data *fan) { fan->last_speed =3D -1; - mod_delayed_work(system_wq, &fan->work, 0); + mod_delayed_work(system_percpu_wq, &fan->work, 0); } =20 static int gpd_pocket_fan_probe(struct platform_device *pdev) diff --git a/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c b/d= rivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c index 2f8cd8d9e0ab..ebbedfe5f4e8 100644 --- a/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c +++ b/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c @@ -183,7 +183,7 @@ static void atla10_ec_external_power_changed(struct pow= er_supply *psy) struct atla10_ec_data *data =3D power_supply_get_drvdata(psy); =20 /* After charger plug in/out wait 0.5s for things to stabilize */ - mod_delayed_work(system_wq, &data->work, HZ / 2); + mod_delayed_work(system_percpu_wq, &data->work, HZ / 2); } =20 static const enum power_supply_property atla10_ec_psy_props[] =3D { --=20 2.51.1 From nobody Mon Dec 1 22:06:10 2025 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 208B433345C for ; Thu, 27 Nov 2025 14:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254509; cv=none; b=nygplB04PPNT36DnLafHOiXSfDVgkKdN6VDHrFqcH7e0XTEe4W8c5RVjn5j9WMgW2Z603yeR0ENoI9eVyHiMOsKfch1od3xRAcqDbqZtAF2fCEDJkN6KwQdRpsA5Zfgxmx4toaFbztOMsGqWIYY6ZY768IiFwwZiCVeRsseMBQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764254509; c=relaxed/simple; bh=LPEPMnco5Xm8MILGkRvk/pMSNneneSPfuGpd3/HN5VA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hdqI95gPv42rcb9dBs7o4Gclvv/1tgPI6EVoCJRIEFc4i5vMUom3wKKS1iOT23Xm/wjs9IrakKducklDr7cW8q2YYkRM1tAOSoQOUT8m0OW72l200hmvoAsnNVbP0ctckSesMwarv47yR9eIsJ1Rzb5Ax+56GeAvhe1El4PRbAQ= 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=XeRdmx7s; arc=none smtp.client-ip=209.85.128.51 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="XeRdmx7s" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-47789cd2083so4559065e9.2 for ; Thu, 27 Nov 2025 06:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1764254504; x=1764859304; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c5QhYCMIe8+tnJfC8W7qm9EkL8jbmR0b4KbpIadX0+A=; b=XeRdmx7sIl7BlR3rJjPd281XAbFENcmAlstHl4GrtLYcE9gk+5v4q5Czc1ENqWWd4a bK6RXNEQ0pGGH6cELM+FIBivpAEaEI70DHKAAu30vky1J91E4DRjqW2OcUuxk/SjYk+V /Uanuv9RnEpKuy93AnUyQ6L3/seyynD+k+a7DMWP9EUElqcz9eVnpSzuCqnG1j8VFbVx ZXJsIMXGWJj+vRBtDScuZh5lpyI28vhwua5x3crhmAuwix+Qc/aKHuswgNYrwsBv6Lc/ gB0wgwdtDtwPApt+2kVYeU30p2wH2DbH4/tcGco+rrj3nUN+MDUbwWRXy3IUPaSNb18m 5thQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764254504; x=1764859304; h=content-transfer-encoding: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; bh=c5QhYCMIe8+tnJfC8W7qm9EkL8jbmR0b4KbpIadX0+A=; b=Xqi8MYN03fgtKziNnKZ6SLsXzyFIVQ2uVQ594gsojBKTC3HUn+YleXjOfpT45YDnX3 bcdqVRNGAiM7jeQQWwjsOuOJ5Is7c0x/wMl7yTAH4WRmlk6Gchfi2wy3ZZIeeyHUn9RN BnCw0o6gvMSNUOWhFMXFTc80v0KQG9BJXTtXtc96ttvXNmiimFGq7YhD1HLdacohFZjH sfnBQe2xR9Kw711nnE4mCgkVX8o5XIbTcvGNNCteN4p+bIaOQkg4avq4gaiqdQSgbUBl h8sDWCf7Id6vVml00XoxLH4rRIvUxelV0IDFFW+KbneVLb2pVCF/8Z1O6s9GaAnFUDQ6 M8VA== X-Gm-Message-State: AOJu0Yx4ow5otFEwrP7xDZytQSHhyA56L9y+jteKGyIA6P3AGnBXsHEK C/UgP9fmIScqSUDET5/xvTVpSQen3VwZgfyIFaNmlOSAeyrOqcwHm4X+77lgvz9QsQVocjHUDZB javUV X-Gm-Gg: ASbGncuQlRZBHqL+b+Thzw/gNx6g48t/GxZHJjE/a0vj6AaD6Uec/DEeltnfpLLFr0c vNhmfGNW1M3m5In9zCJHJdqAX2WjC9ea2mbQNKWCxqZW9IQPfIW+jGIpgB8HCuLmXWqcmWqq9e/ 0hAosVu+e5Rj0xjD9FU57IptKSQUBCV04AZPgXuPPdaEx+Z0PhuNjBGwIYyWGx0+pzyudkl4UKo Gc9grxVKIPGgzPpc2JSZHq20rKoTUodtsjcjN9uUhkHDNivFNb/Tbc3RH+kHGzD/W6dgFDQX7Mr gnk7T5qoirJm1KDiSWSiJ6pZhOGKcLazC0PIDRHtabBpaS1wiMALa8DQ6L6A/Syku6/PgwAPl9K n+xVEn474k4sSD/jDbAo4j/BFYQfdEZuV1If/eGfKTfC/788ufnjKyVs8WKsNFyFniKA4noRzMG rj/msfwTIS9F/imm6LTfDlGt4dK4addfu0M73jUzcp+j/q X-Google-Smtp-Source: AGHT+IFYY06oLJ7g09W/M0ZrcXobhxX7T2QvNS6KAiC9yahbr2Fz/AYikghcO3j3I6L3pA0iEav/7w== X-Received: by 2002:a05:600c:19ce:b0:46e:48fd:a1a9 with SMTP id 5b1f17b1804b1-477c115dfaamr213338575e9.33.1764254503891; Thu, 27 Nov 2025 06:41:43 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479110b6da9sm37351465e9.0.2025.11.27.06.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 06:41:43 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Maximilian Luz , Hans de Goede , Ilpo Jarvinen Subject: [PATCH v2 3/3] platform: surface: replace use of system_wq with system_percpu_wq Date: Thu, 27 Nov 2025 15:41:25 +0100 Message-ID: <20251127144125.233728-4-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251127144125.233728-1-marco.crivellari@suse.com> References: <20251127144125.233728-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch continues the effort to refactor workqueue APIs, which has begun with the changes introducing new workqueues and a new alloc_workqueue flag: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The point of the refactoring is to eventually alter the default behavior of workqueues to become unbound by default so that their workload placement is optimized by the scheduler. Before that to happen after a careful review and conversion of each individ= ual case, workqueue users must be converted to the better named new workqueues = with no intended behaviour changes: system_wq -> system_percpu_wq system_unbound_wq -> system_dfl_wq This way the old obsolete workqueues (system_wq, system_unbound_wq) can be removed in the future. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ --- drivers/platform/surface/aggregator/ssh_packet_layer.c | 2 +- drivers/platform/surface/aggregator/ssh_request_layer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/surface/aggregator/ssh_packet_layer.c b/drive= rs/platform/surface/aggregator/ssh_packet_layer.c index 6081b0146d5f..3dd22856570f 100644 --- a/drivers/platform/surface/aggregator/ssh_packet_layer.c +++ b/drivers/platform/surface/aggregator/ssh_packet_layer.c @@ -671,7 +671,7 @@ static void ssh_ptl_timeout_reaper_mod(struct ssh_ptl *= ptl, ktime_t now, /* Re-adjust / schedule reaper only if it is above resolution delta. */ if (ktime_before(aexp, ptl->rtx_timeout.expires)) { ptl->rtx_timeout.expires =3D expires; - mod_delayed_work(system_wq, &ptl->rtx_timeout.reaper, delta); + mod_delayed_work(system_percpu_wq, &ptl->rtx_timeout.reaper, delta); } =20 spin_unlock(&ptl->rtx_timeout.lock); diff --git a/drivers/platform/surface/aggregator/ssh_request_layer.c b/driv= ers/platform/surface/aggregator/ssh_request_layer.c index 879ca9ee7ff6..a356e4956562 100644 --- a/drivers/platform/surface/aggregator/ssh_request_layer.c +++ b/drivers/platform/surface/aggregator/ssh_request_layer.c @@ -434,7 +434,7 @@ static void ssh_rtl_timeout_reaper_mod(struct ssh_rtl *= rtl, ktime_t now, /* Re-adjust / schedule reaper only if it is above resolution delta. */ if (ktime_before(aexp, rtl->rtx_timeout.expires)) { rtl->rtx_timeout.expires =3D expires; - mod_delayed_work(system_wq, &rtl->rtx_timeout.reaper, delta); + mod_delayed_work(system_percpu_wq, &rtl->rtx_timeout.reaper, delta); } =20 spin_unlock(&rtl->rtx_timeout.lock); --=20 2.51.1