From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 AE2AC40756F for ; Thu, 7 May 2026 14:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778164805; cv=none; b=r2XuxKdsLeIKEFUFaYjzjvX+094d6d81HB911q521fIhyHIBPAFb2zib8/tjYkXRyL3UZRx+Ej9acnaa+wGv0ao4cogs7+lLsIlgLiCnKuQHJlS62AW9Ob4M6Q1Y2ALBS0dSbIsp1Qq90hd8Ch8rA1R+4RVXH++U79a1y0EA3Vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778164805; c=relaxed/simple; bh=9i8wVeR3JGIzzDdoOlOV4Dt1ow4Qbw1neuY/X+3SHWU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=m+ale2//DPQq1bWpHZ7DXWTy87psMItoXBqus0YlGDQ+YF7VzrvjADiP96JUMzOU0/tZ00XtqixsOdmjE8G5C9jjm4BsvtQ2iBWBAHRRySk3Y52do9uecmJk4SvScSwPzxlKOC/8Zwij7LRPJIBkbSIM7CutftQosGhHReZgki0= 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=eu12+6Uf; arc=none smtp.client-ip=209.85.128.44 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="eu12+6Uf" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-488b8bc6bc9so6157635e9.3 for ; Thu, 07 May 2026 07:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778164802; x=1778769602; 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=6GP3FoSJEigBezrG4cSJuHLL5OsUHzb8oH8VhdDSWG4=; b=eu12+6UfLxSyXGgGhtWK8+aqdzxXvU6KboByv+1xFBtqW0vZehbIAUeWSHvwJ4GSij FAR9fgaPr9paoEcb1D8qjaOA+UlOq6ZdKYEICBExVMm1kaI2osA+qKVNIWVDI2XDUYy5 4LAnFJh+VmXZglS976frU9RZB+OrFt+OvGKA5WPYS3NnrbQ3Wc+onxu5/I5lhK7847DO Bv0i880uPfrTrYMOkCO0g+KduF+Tu/yCQYtKksM1C7+FvBt444jy6EwxddocMTB8Er6Y cWYxWOqMD+CoIzHKAgUuNpq/LNlc7d3yMFARv7/CU8hSUbbDomkmYQBhm1ji+9CM+keq 0jTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778164802; x=1778769602; 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=6GP3FoSJEigBezrG4cSJuHLL5OsUHzb8oH8VhdDSWG4=; b=XoB8xe4vaKWMImlo6ZgG3SxqOJi5uJbfoSPWg9+781tytdZKzHZ4R+g7I7x+lBFuD9 qKfXJDXQ7RGJKzUtRv9YxOK6fNGlT24pcInOABIHdiXPNJSq0l7/ohBTsSycseSfjk0b weKny6qrk5vDo/UNEY53A8TBEK1qGqSDPKNVW+mPd3NPuOAVLpMRJabx2rDTmThNxXau ylxi1ynHZ35zdImqTa+OhbVDI3HBDDjQS4uOohWtsdmlXg6CZPCOzMJOvudq1Ye0134b II/kr6CQefPanbJlluKLSCIv++1idlqj+2b8oWlFdFqiVQrOt8AmXX8GOD4FdVEMUh9C gdnw== X-Gm-Message-State: AOJu0YztDBYvtsG9fHrodJqkpK2KRYrwv05vsx5lx3t+ISqUiDaUwj8L G3bOSXDzseCoGVZW0o9XJIlq5Dt7N8bzDoCD17eT4w3Y7oo/SNkrSvaSt3s6RW5EsVI0wfXQWlO 3b8qKn6o= X-Gm-Gg: AeBDiev6Rz1AL8aEZvvhsQWg0iWiCrNq+nTpcuP0MpwrZH2R2aedSTu7K+M8fPw9eRb LwHiE9FwKisFx/z5irH7VZGPa/GrpfHkAmt3yz9AnPqEVdr1FcEJH+02EcYk9ZQnrcMnNeBTHDw 5HCZ5u+rdTPcuczlInj+mJ49LziyqGa7o4Skejqb3r+PkpUWHoVeYze4D5R/ywUsJSS7raYiVp7 1nc6G/aOsZpXEFViYphR1vUHWlBlfErDZ6qXF625QvYboJnzrzBpM4v++SBOx1MuB9B6i2W6emG 2OYNQu5JVJVm2OR4M+aJpQK9L60cyKxEzEZEcxaCB1Bx71MBGpDwdplD/OQAJB2xa+8oHC9YSLj cUeMTSy/BevTBeuttgXVroMPxm6Gv5QceJmi9p7bX/2gT2queBO7Kk8qa2sjiiCZa3mJZPA+HTj T8Hk+Qq73Bs/7wICquTf2W5+HM90YQIPR9z7w/5OjMLNeK/VpIKI3NEquCE1DFRTDDQapG X-Received: by 2002:a05:600c:4a25:b0:48a:768b:eea9 with SMTP id 5b1f17b1804b1-48e51e09797mr75327075e9.4.1778164801852; Thu, 07 May 2026 07:40:01 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e59b74277sm86655525e9.3.2026.05.07.07.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2026 07:40:01 -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 , Corentin Chary , "Luke D . Jones" , Denis Benato , Hans de Goede , Ilpo Jarvinen Subject: [RFC PATCH] platform/x86: asus-tf103c-dock: Move long delayed work on system_dfl_long_wq Date: Thu, 7 May 2026 16:39:53 +0200 Message-ID: <20260507143953.342654-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.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: 8bit Currently the code enqueue work items using {queue|mod}_delayed_work(), using system_long_wq. This workqueue should be used when long works are expected and it is a per-cpu workqueue. The function(s) 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. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added:     c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works") 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_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Signed-off-by: Marco Crivellari --- drivers/platform/x86/asus-tf103c-dock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c index f09a3fc6524a..de683e17ce01 100644 --- a/drivers/platform/x86/asus-tf103c-dock.c +++ b/drivers/platform/x86/asus-tf103c-dock.c @@ -669,7 +669,8 @@ static irqreturn_t tf103c_dock_hpd_irq(int irq, void *data) { struct tf103c_dock_data *dock = data; - mod_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE); + mod_delayed_work(system_dfl_long_wq, &dock->hpd_work, + TF103C_DOCK_HPD_DEBOUNCE); return IRQ_HANDLED; } @@ -677,7 +678,8 @@ static void tf103c_dock_start_hpd(struct tf103c_dock_data *dock) { enable_irq(dock->hpd_irq); /* Sync current HPD status */ - queue_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE); + queue_delayed_work(system_dfl_long_wq, &dock->hpd_work, + TF103C_DOCK_HPD_DEBOUNCE); } static void tf103c_dock_stop_hpd(struct tf103c_dock_data *dock) -- 2.53.0