From mboxrd@z Thu Jan 1 00:00:00 1970 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 08B2634EF04 for ; Tue, 7 Jul 2026 14:53:49 +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=1783436032; cv=none; b=o+OIPwGR92lsDkaiqQTnTJ7wA/i+YRHnbhBE6r5+h+Wlf0TVML6OZQwk6mgp5rru0zS5sTDSsLA79r/tUKEBPCO4ndNp2Ia3KW45aSKmyO2AZQSkvXB3ivK+PALvSKbQbXDPDaR9cGlhGcFeosFpZg2xg+qesmUl5oYlL3S5TVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783436032; c=relaxed/simple; bh=CzrIdF1nbeHBSS89V19tgL383kJPDeuI6sNseLUC2N8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=vEwmtjjOsV77GI61JNCfImGVSKcEQ1hMw9GvMsmjSawc+oLmq1sDrDYsziV7W/lgjku2ds/NuEyfS67URX5yZ8eZ2LKEqaf131qQG/Hka01M7RsyHcPcaZJMSDCfONg7WU5JQvecUvFOH6CviFhzt6yXbefzxl+W97i9lXkdsvM= 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=cIx926Db; 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="cIx926Db" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-493ba701891so34200475e9.3 for ; Tue, 07 Jul 2026 07:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1783436027; x=1784040827; 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:content-type; bh=bWmMpMhPBO/EOzHg9dXhWeBCCLH108Nq2eDZhsT4OEA=; b=cIx926DbMQfPB8QozBNnvtf/FDPD38tDWLwcezIWzwKT/7RrlsORWY1JHzpmrzwTDj QMUQfXZmmHbGN7wDfNSXooG3P2vdwpZ6HKUTTl9FKNEHs/255JoPISRvDr/JEaJna8GB aj7RDtZ0DgOOEl5BUaSlRMZVgl/edFSirPpMxnX23JwwPXfkPXlKbbe23f6vGjOW4oyP ueEAWzpFW+d+vPcZRR9XqQWPVP84bOVBUdIGEoasC46/EagtjT+BfwGbWH9AidLs0LMH 05Pe1VwJqqM4IWHC3ZSzxx5cx/ZIGtZIri7R/76UlZwD/60/gAbLLP9TwXJgY/UMtupp PkYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783436027; x=1784040827; 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:content-type; bh=bWmMpMhPBO/EOzHg9dXhWeBCCLH108Nq2eDZhsT4OEA=; b=S6w5gBHqwSa8aWLUUCXMnmbSUT2+CwEHCqURQw0NsC7ZxI9lKlR6pvLad6IahXtOpl uTNo6pnckvjlFRWEkrTIYMDp+jCmYRSqfFEZhpp0rCQJq7mik58crcsFR3jY3F54lvJP 60zA3trgIUVcN9yiJ9foAvGM5ik1gN37sIx+dyWWP7OEqLy6g09JNvF3GqFytDsiFlQL mC1xzyVfkBTN/3yVsj1H6OD/62uCyyTW+i5tj5Cam2G5VjdcOpo0xUSzQAMLFcQCVNH3 ANNn+8pBqA2tGjRnYaRfipa7IuXwI25gsKWrgF+efs4izWw7mMOjVRg/Owvm++SK3QTM UjBA== X-Gm-Message-State: AOJu0YzomckWUF0glsh9uiu91XF2umH0sR+u1hVwPhmmeXQrXCD6lQou heK7eiq0wgVXQXgeEGbfvT7ltHPGbbFu59Q1TXTZ8QDrUfOKYxhzwiaD2mmi86GEgaLPDi8vt4R lFT9ErPM= X-Gm-Gg: AfdE7cnjD5ssZWD1juAomkM/lWwgJtYwAuD6by7bHfns/YvtjzcAFzGMm4QuXxACR2s 344iTyYm0oNht/s/RKgQgxgThV9Zp132Ki4PE9vkn8NfCsBwCioAnbb47JNivpsKZnv6ankk4nI 0RsnGLsJj81h0yP99OGfd5qr0lj9ZSF5A/vX0vLqOAdj8W66cnVrhNPE8HnhkVLRaT0OzueUqf9 G6Zo2QCH+HNmNCLw42Pmvgk/NeMI5H+y9+XofUP/eK6qgUqll0fV9/NJhr6Oyv1tGHZ7C1cYrym wo/pr4Gl7YMta6v4RVxebqE9QgWWug+PMtjFsxOoetrIjzf5Bxwyp3FNaAmmYEvZUDC6qD+/91D QTn3CoPdbY6GY6xHF3wsLFtfZ4BRKlP8y0z7soA+K4T6z3n66yS0ZR1W0P/Pma6MMTK+PhcUMrC XqDu1Kh6gOctCWxRNtO0fkypv1AaNfNholokA= X-Received: by 2002:a05:600c:b85:b0:492:4723:166b with SMTP id 5b1f17b1804b1-493df05f8e3mr59452385e9.13.1783436027489; Tue, 07 Jul 2026 07:53:47 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493e10af550sm60425025e9.1.2026.07.07.07.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 07:53:47 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Jiri Kosina , Benjamin Tissoires , "Derek J. Clark" Subject: [PATCH RFC 0/2] HID: Replace system_wq with system_dfl_wq Date: Tue, 7 Jul 2026 16:53:01 +0200 Message-ID: <20260707145327.313292-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: 8bit Hi, Currently the code uses the per-cpu workqueue system_wq to schedule delayed works. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Another good reason to have this unbound, is the "queue_delayed_work()" function, used to enqueue the work item. ~~~ Details about queue_delayed_work ~~~ system_wq is a per-cpu workqueue and it is used as a parameter of mod_delayed_work(). This function schedule an item that it will later be enqueued (once the timer will fire). __queue_delayed_work() does the job receiving as "cpu" WORK_CPU_UNBOUND: if (housekeeping_enabled(HK_TYPE_TIMER)) { // [....] } else { if (likely(cpu == WORK_CPU_UNBOUND)) add_timer_global(timer); else add_timer_on(timer, cpu); } The timer is global, so can fire everywhere, and the work item will be enqueued where the timer fired. 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 the workqueue with system_dfl_wq, so that the used workqueue is now unbound and can benefit from scheduler task placement. Thanks! Marco Crivellari (2): HID: hid-oxp: Replace system_wq with system_dfl_wq HID: appletb-kdb: Replace system_wq with system_dfl_wq drivers/hid/hid-appletb-kbd.c | 6 +++--- drivers/hid/hid-oxp.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.54.0