From nobody Mon Dec 1 22:37:12 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