From nobody Fri Jun 19 00:42:42 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 13C033BB12F for ; Fri, 15 May 2026 14:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778857145; cv=none; b=ObAiVlpGqoZqu1yT2uZwV/H74FV4Ck8Os0vWoVu2plIlIVc1aN0ozU69/y0PrcjJ7x+T0iRqCDaztv+xJfqrKCfnATK0bA9fJ4fl/yp2Z48267o8gG/RI0T600dsNml0TRlKmCVV2CCBojlERhoX8IQoub67xUs/vSTBelhq1Ew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778857145; c=relaxed/simple; bh=h0rCp41D3Pg2TxrG8vWD9hrmift4VvKTJlz2qHczbe0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UVy7N7EaoJ+y+eBbFz6w87VGdceWZeOSM+ysmekW3Z+Xolld7Y6fGmFvla5JWLA6V5cKf/ypm1uN8b01pomIr/nFKyYMLkWaA89N0Tg6nUzDX+Ji7zZ1uKQ2frRZInw/Ve0UmjcloqGII8oOvCjNZ3nrIR7xPJoW0wbgWvqdxbQ= 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=OCscMoZw; arc=none smtp.client-ip=209.85.128.47 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="OCscMoZw" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-488e1a8ac40so88293515e9.2 for ; Fri, 15 May 2026 07:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778857142; x=1779461942; 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=wk53r8Cu+FpSb5ngFCh5EG88e4zuuAu2HnUPF1zbZMo=; b=OCscMoZwczk3vmdVh7nKS0hUrIjVf36kDO0p48+FIlmshd59V5FJt311C9ha22gx/G rO4v2SHK+9+t8p0zUnA5aK9CKe7ij5de1y2sDAszMT3zYegqHPKbLH+9rzeEhgh9c5/a 9ieLLRDzVuvS8kay/SXMqnPSldACwNJrOWFHpPc9VsYWtmdDs9YicH3CQVx4I+fFxXYw V9RoRF1KFIpCbTDE69+wKj7Z6ZigKjDSAh3rhSuev9IMvZICFmZ4c2OsUPONtZOVk+vg dYaGpUD4tTQu9WIpHCUwqbmdjDP3UBRx9jFzAlqkfLP5/xp8vu+HfVUBOV/zuUlwiMKr L9fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778857142; x=1779461942; 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=wk53r8Cu+FpSb5ngFCh5EG88e4zuuAu2HnUPF1zbZMo=; b=gFGuS/rSigSm8skpAQpqcjhhPaKjuc0MJD2SAnZVhiASDZd5urASw7YRpaEMsLJUDS FN/Wr9Lqu+M4oatLkzHgFvWv9FFlUp1CIIy0m3nYmWJqv8ftey5r8CHnZ83mmRMnhGto d4OWP1y3by7r4NhYS9KkcUaO6nSNZz4eiazqZXQSD7dWTo01G+Wa8tltqUcOtkrvnikM 14V2kWKmAjL0+m+/RPFXwGNJ+Jo74miGpDZIXJyaIUnnAQ/FSMJpsJxZ1P5nx/9x93B2 T9mrqk8xEaBPOxunu2PdsPQ7pdKDiRQbdWidIMCKVqvxVGcH5oAAivwMIIa3lYO0r8O/ ZTrw== X-Gm-Message-State: AOJu0YyZ3DlYmmr+lAuBasKmHxw2vbaniaTauS31ubb8ULfGLmubqsmp Rq51J9RQC5qakWbD/G6xhM+uzWW0Cjdv1fBOxl7VvFYcSEAGIEXCHNLcp/+czV1td0IpN7owJmS F1MI9fUw= X-Gm-Gg: Acq92OH//dl4yvhG+TCX4ebsaY8UpCkp5dnMOpPDtwHSJN2gCqzvF3CksaJ0hnmhLBH 0XuoFYOcV6PZ1U/l0GaWtJNvOCN/o3oUa5OmOFFYJ2EugL4chys+n/0/RiY7JDOitpXbYzO+Y4M 34IHZGUQi5p7tgyWFymvzVeWz4uQmZqweTq8MsU95/uJSV9OPom0B/nPaYEe4OzUZUsM7XdMJ8g /3LutivC10i9bm27YC4NgcFkc56ENkJjdm44or1xPhNPqbqrMWy7Jr6mLLuMrJ9M0J1hcZA+364 9QuUFWAEFe2TPkFqGmFOnHFFWO67tNee6aSITvTnsLgGfFDJX7r4B9v1ZSsXcBn7jFiPgVKd/CD 6EcYENDGqg5bL/M1cYCNJJHJbMttnJrxAwBgEoMikZzya2fLXX/yjJSxGJ+whpocsTqqEJeH7Cb vIbAZKkShchwPlHuE6W6jvR4fIq8C3DffJJ6BeKvRlolnbyH8= X-Received: by 2002:a05:600c:a4f:b0:48f:e230:2a24 with SMTP id 5b1f17b1804b1-48fe66204e8mr57404185e9.31.1778857142248; Fri, 15 May 2026 07:59:02 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0a1aeafsm15013170f8f.23.2026.05.15.07.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 07:59:02 -0700 (PDT) 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: [RFC PATCH] platform/x86: Move delayed work on system_dfl_wq Date: Fri, 15 May 2026 16:58:51 +0200 Message-ID: <20260515145851.318787-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently the code enqueue work items using {queue|mod}_delayed_work(), using system_wq, which will be deprecated soon and replaced by system_percpu_wq. commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") The function(s) mentioned earlier, 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. 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_wq with system_dfl_wq so that the work may benefit from scheduler task placement. Signed-off-by: Marco Crivellari --- drivers/platform/x86/hp/hp-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-= wmi.c index 24c151289dd3..b7c12f943770 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -2388,7 +2388,7 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hw= mon_priv *priv) ret =3D hp_wmi_fan_speed_max_set(1); if (ret < 0) return ret; - mod_delayed_work(system_wq, &priv->keep_alive_dwork, + mod_delayed_work(system_dfl_wq, &priv->keep_alive_dwork, secs_to_jiffies(KEEP_ALIVE_DELAY_SECS)); return 0; case PWM_MODE_MANUAL: @@ -2397,7 +2397,7 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hw= mon_priv *priv) ret =3D hp_wmi_fan_speed_set(priv, pwm_to_rpm(priv->pwm, priv)); if (ret < 0) return ret; - mod_delayed_work(system_wq, &priv->keep_alive_dwork, + mod_delayed_work(system_dfl_wq, &priv->keep_alive_dwork, secs_to_jiffies(KEEP_ALIVE_DELAY_SECS)); return 0; case PWM_MODE_AUTO: --=20 2.54.0