From nobody Mon Feb 9 00:42:33 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 4EAB6329386 for ; Wed, 5 Nov 2025 15:58:00 +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=1762358282; cv=none; b=Fwt9z8qQiUWXF6VbHkJCQUHAGv214jBXgCnRbPaE3+o7bmoAxWgiz9wxLaHiQ+SvjETOeC0flT8vGNXCJH+ZG8GKo0gl7Ym9cRp2ychlKxdW0WLuTzgI7qMdSe+KqPOLllQmnDDZmIF48Za+WXeQuBAfBQtnCf7OGI9r1MgZPZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762358282; c=relaxed/simple; bh=0juMyDMRUXKUaPALyDvOumxXmXJXFGZjKJfB24N29Lk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XoGZdGRlRHkwyQbWP/siZMrNBiE4mdijNA+N1c4A/XxUsLnu4XIWDOxizIJ3CWJzrye61HRzaDYCA6zgJ1sP4FYkm1XyDBiXtMYtdIeIFyMD4iyVqmTc5q7x8xPCkZq4zyw/bMYzpKEI4wW1EY2f+2w8Uk2YpDh9miuNh3U+kBY= 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=VTLsx2t6; 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="VTLsx2t6" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4710665e7deso32142355e9.1 for ; Wed, 05 Nov 2025 07:58:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1762358278; x=1762963078; 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=FjaDKV9LCQmWEfoKcz3mnBs+RpSagfYrbdY3gsz2Kew=; b=VTLsx2t6s+zH9HONiaR0NYX9F7mI34dz9yxpqaGF76pCpi4b8Qg6NBL8W/lVmDQaVn 692zhEusRy360woolElvu5Zi36NGpm1yJkPBp0pEv7C/Vp3Iqm+c/CJUp4f5EtbK/Ha9 ZRTZpMo0+O0KJaYye2WpRgqDmy5bP9VwsCdgn7I6zboMQ4WHqFsOg1XDAdjX4e0/5god 1GZxWrMOMzz+xr5yetn9O25DAXROzZbRkazFvrVqVf4psxyX/rNPq4l9k3uj6PrgKuBa r3mo/02Q5KTDbbOwPuXrjYGNCHZczAHhS37bZH1ax0wIbPro32Ws7YhHAmmHSGS/nGkI /4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762358278; x=1762963078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FjaDKV9LCQmWEfoKcz3mnBs+RpSagfYrbdY3gsz2Kew=; b=D9CDYng6T/KZnuJ+HJCZ4O+KjiVxbI2oKEmFQ++fFgN2tyQ5tkG1Ire4zbah9O/cV5 0/SQvCz8KwAoVBOAWuK/qX0IybQmtytCcFtV1VVoK6b+65zKj4fpzCyQ0uUm0a56LloM klU8fADMCBwFllA15RSlXBwUsgHpL4GiYvN/uc/5lTZe7ECLFMr0SE9A9/k/JheHWklt ScqXSmQqHukgpGF4GfPJRVFdd0+t7NKcF2nxY5qq8fWTrYErPYs2xRSed7bL5PC/7zIt YmpxP5+D09rOo3bgC9YZ/inKD1CxMMg97nG5Bv6Vt5uNg+SGOzlKX5PLuoGTXEYhpb7L 25ug== X-Gm-Message-State: AOJu0YzsvNpMChXFxQhy+jnHye2V2XUJuyt+u447rkuJjXEmYRHpKITE stNuRYKy6QezXmJFgFlEEGZze0ZhYdW0Vt1C1IyG6SLV+GZ3UGHP8USYx64gPXZD8/3obrW3Nln EQipo X-Gm-Gg: ASbGnctqrRkQJ8we1+8ieVbPKb0KoGW+ynZx1Z41rb5ko4mLnpU5C8+h1ZoNfA7l43b ClNcY78J+h9tf8VgphPCKAI67c9gNfHOKiJ6WUt/BdAaf7IeYIHouEsrV+KHwS9OKrJLQTYvS2M Blf65GvMaXAEavjdpN6km0JH13tuy2nSkx7a0d3eBn+Amw/5CYiwhnfaWwR92A9C8xKelJD5K5y iXzihVOkAN1sAhDd1/PIcY7hSdsaIFoQS3caGnPmGVQewAScKzcyZXRx5X6Q8Ok9Dxw9ki2znBZ IBwBBfvbpLqg546R5Dp6T5UFE1RYRZQJ6RzwZszT8oPKgvarE0OHPNbgve2gG+3s5uJeES0bevY NUcs6I6qGX6YFtG/8OMIlqjTogjKZ72NajuqdbaDDMfU/cs4pWQCTXqyb/d7+Le31V6I2gS7sIH YUJUlloqaRgHv/nSngwDutbAp3yzfbo2PSNw== X-Google-Smtp-Source: AGHT+IFmHmXfTRK5ZoJhOa+eElcl7UkfXFONMs9IfbNmfXHDnWFTChL/HrvqCSssLTLQgY2Gg0zfEQ== X-Received: by 2002:a05:600c:821b:b0:471:b5d:2db9 with SMTP id 5b1f17b1804b1-4775cdf26edmr38095045e9.21.1762358278377; Wed, 05 Nov 2025 07:57:58 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4775cdc2d14sm55567045e9.1.2025.11.05.07.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Nov 2025 07:57:57 -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 , Hans de Goede , Ilpo Jarvinen , Maximilian Luz Subject: [PATCH 1/2] platform: surface: replace use of system_wq with system_percpu_wq Date: Wed, 5 Nov 2025 16:57:35 +0100 Message-ID: <20251105155742.293326-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251105155742.293326-1-marco.crivellari@suse.com> References: <20251105155742.293326-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" Currently if a user enqueues a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistency cannot be addressed without refactoring the API. This patch continues the effort to refactor worqueue APIs, which has begun with the change 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") Replace system_wq with system_percpu_wq, keeping the same behavior. The old wq (system_wq) will be kept for a few release cycles. CC: Maximilian Luz Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- 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 From nobody Mon Feb 9 00:42:33 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 3665A32ED58 for ; Wed, 5 Nov 2025 15:58:01 +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=1762358283; cv=none; b=X/I4xhZZ7b8Xjczm/huRD80+pE4Z2pRqhVkwh2RXMcJ4uLHfcIjigYVA2XvhPGiW21/oc94vCu2vK7dNN90aHbg7VOj59C2LCVf1HWxu6ragi5AvZ1PzFbQWqNAeRcfDhI/VTz/gWpdY+bKpDwjkBc1XjhfnGXtbtBggL9E2j5M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762358283; c=relaxed/simple; bh=grk85sjF01n32HUEeHZMfrtFgSo/JagXsKYG9XfD330=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G4hbpMJ6lEV4rvSo0Aero9Z4zw21RWU6P/b8oSbYqph4haAYTQAIM9J10IKiSznzv++XEgznaGwXKmSbQems/hU23oYNag4L9XD76rKVNY+SRc4CdDsJtRZqZ6/TFZNEeH09vgVUNtM7QljyuuOjDm6I3Iw3C0vGcZg0pQuVtMw= 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=cu89J4G7; 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="cu89J4G7" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4775895d69cso9931115e9.0 for ; Wed, 05 Nov 2025 07:58:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1762358279; x=1762963079; 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=R7/JvpBa71JfOtKidEFviFOI29HJTQ4dpKTrEsM/LHQ=; b=cu89J4G7KVjSaecOcu/O8omJFtDGcPNsmtv6kEROvubIGH5Z6rHyfcz6XCYlhmGA+P OXaULNG82WyxFY+eWNItSwTZOkI4Y111vgH+FpvgiZatU0mtKUo4pkvkP/8oQp4uqKi8 I65ibeexcCKV57mGGwwXbXZCV8Y4/rgL9JdCxWdMnFj76bHMtKy3n0F+YuDWWNfwWl36 NP+/zDroJk2jIZiWLHKuXoW8/+WMZjwC5vECr88pjzx10Og+3gH2X01P6253yxggatqJ hrtukIAvsIpKIpRZJ0FvP57/3D766mvWhUyiN8QvaHblW47fzwaI9TwbJDjbbFV45DuL CFcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762358279; x=1762963079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R7/JvpBa71JfOtKidEFviFOI29HJTQ4dpKTrEsM/LHQ=; b=Wx5gnyRMSMprklmLNOiuESF0/N99049xFxvi0nryvBqsTQG8FKPPcheQBYQ/UX+ssr 5Vqee3jYbYtmbhS2kL2WzH+DY4FGYoE3ZF7c5SA4Tbm1FHx47hj4Jl2g4oNnYj+B+byl oKKTbnjS4NbG+bdl+4lHgs3/7aUHWTs8J6F4hS4ElcWODwwsHreyvpho0mcxgftpy3so spVHzPwSuNt6C/HMZMqMeptzZYBnOB51O244cFkHUaUqYSgg2GyJnfsgDtckmTStjiC/ r5DFo3HcO70uzK4Y+jCvyTmLj30C+vpZTzaq0igrjg8hXoI48eMewoySrB5xt6yXMRYK Rr9w== X-Gm-Message-State: AOJu0Ywdm75lNSQkZ4TCpdK4m2CEibbB6Vck505Hyr0pVonzTYnYwz8v MyXmV3k1/BTwyF0/Nnk1wT+tCcSx6kQJQgI5nSOrgDz/UJ36zFPCko056CypRTgIiZWKruGbEHD Ki8NT X-Gm-Gg: ASbGncuan9hyptztBRIVksYqwm2IbxfrX3um8SQSORfNN/q8q0JWoVUYZlbdmt+lfh1 WQB46EpcqLNmUsOV11XgM2LcKmGhulOTw4x34xthzKCOCo53kztjxv3KSu+qVR8azb9QeS1XXEH E8nvSgConCu+HxEqssQG5BwDlGLd3ui13LBNA29VEJqub86oy08zqY0gYcoA2RYbkkAVhRIXspu nks9cJVY0uVF4eGtocnjbEIeeCizWfacELwL0dybcVbI/mjAVDfTWPTgMQ9zSn6bFFKcmAXbtQf kKY5PYL8vjEE7nyX3gjhIMu2cUj2KMD2e9LJ8nrhngW3YqZ+1dVOzYCbw2z2YjOKGM8VyGvqafP fsuAprpxLzFGy+Pfu/iLY3UwFAUaLkZCNlVy0d8PSOeXuE6HYfhLT3IN1N9WDDQrD8sbtlCuWC4 7xZ/2nHtmddbUtII0Ch9PeCZRQOg0dGKBW8w== X-Google-Smtp-Source: AGHT+IHo7HnClSy+Sn9IiiLMeR93GNnuA4NgdJUp4IkSAPro5gqZR0uQLn2I+AtxyZHtt51f9TXbQg== X-Received: by 2002:a05:600c:5488:b0:475:dac3:69a2 with SMTP id 5b1f17b1804b1-4775ce164c5mr32789045e9.27.1762358279231; Wed, 05 Nov 2025 07:57:59 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4775cdc2d14sm55567045e9.1.2025.11.05.07.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Nov 2025 07:57:58 -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 , Hans de Goede , Ilpo Jarvinen Subject: [PATCH 2/2] platform: x86: replace use of system_wq with system_percpu_wq Date: Wed, 5 Nov 2025 16:57:36 +0100 Message-ID: <20251105155742.293326-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251105155742.293326-1-marco.crivellari@suse.com> References: <20251105155742.293326-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" Currently if a user enqueues a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistency cannot be addressed without refactoring the API. This patch continues the effort to refactor worqueue APIs, which has begun with the change 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") Replace system_wq with system_percpu_wq, keeping the same behavior. The old wq (system_wq) will be kept for a few release cycles. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- 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