From nobody Sun Feb 8 09:11:01 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.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 DA2642D3A7C for ; Thu, 30 Oct 2025 15:47:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839277; cv=none; b=nd6sTGwJkP4egIfq2sJs0+Hnc8PiAMnvn2PPQUeYy0awZdgTgONi+m/Qpnms6uxNNS5DBB0kPTptSqMOA+cBlhS0oSRXV6AP27uyO6XEsnpwYxFtPIIwIyIUZKl+kZKXdYKZ4sQbNUACa4ilMCQ0tzBBQCU3JriIcFjj9Sp6abk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839277; c=relaxed/simple; bh=/7LsG64oWK7wGZDkhEcwZF7KCXXElgpetNi9oy+Oo9k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lhAK9191CrNX/UK7YFXOhooHPfWFERjGfDJ8b3V70S4Q0D1eIiawjOtCjlqHAddTqJhI3iuOQT5r7DuWGlLP+ueD42P9BxTLVrUK+jrkL+NN34ncTxfEByp4+qHd5f+sBZbqjFmu4e+TVnKrRrhqs+6yOtc8Q8E4fKvs5i+H3u4= 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=PDSQpdEv; arc=none smtp.client-ip=209.85.221.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="PDSQpdEv" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-4283be7df63so623085f8f.1 for ; Thu, 30 Oct 2025 08:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1761839274; x=1762444074; 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=94J6pOSo9Nuw6aebkUjzuSFc2ureh881e+PTgGeW2qs=; b=PDSQpdEv9Va+o2beBQso0UH6T1ZDsLE5Vseo4p+/4PczU/zft4iLM1fkTeziawf1yU BLgs1Xf8cH5gZPJ1wb18Z2eu7CAD6PbtHroDHrV7jl6lXRGSLT9DFpsg4FTqGm66mZyp LiBdX3AbuvwDlhJzYk0SpSfwXs7/Mu0obPRkAKPqPc503vM3qpr+1e2Qow4ZJ0Kem8zz gr+XNbOWfqHnM/bDabMfZzYlQWaODEvlgddQRY9ld2kpGoFTdimH23uLzn4q/u7LJD8M 0SzVzioD3DnZuJkcVp6U0r4lhOu8ZEauDcTvf1n4psRUBlWTH8KMVjhsO0yoKGNPgGFV x39Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761839274; x=1762444074; 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=94J6pOSo9Nuw6aebkUjzuSFc2ureh881e+PTgGeW2qs=; b=Xnn2Se3jPNmlGHpzPWLS2dBBW5t0eLgJJulSv4KulxLhTlliH+MHbZZysjC/r80Ynz ThzE+Q0bFDW6ItBznyYp5kcE1rvSQ4BukfuLJ9xvr5IRRZnaE+SgIotpDSrndf2SLQgC 3HECCZpXRswdzsEo/bNx25zrmlikooq8dH/3inOExaNrStZCOHez8zoJglXwZCplsfmL TGYwBaWK8GdX3PvsaJkJqDB0Tq/NSZwwvjdVXf85YeXpKnMihVgROoPLt039CB+MfIX+ z5UKgZKeF1nkiXdy+NuSSQ9TUJkIJo951sfTms8wdB9tDfnzJ7kiAjygZdanAGplpBJP us2A== X-Gm-Message-State: AOJu0YwBUB+crPq9frEGF9zbgrc657rTKvRC6C4RrgjdtS9GLsRR+wdO qKa8RIwsk1fp+2o+s7BTQBxrR2CML7qKCMy4DIWjXoJieB7Fv2YVGwWeG67hOT615tEEfDRfgxd WVUfy X-Gm-Gg: ASbGncs9hR3B8rqbn9UnVGWfk4htWtvrQCEwFpjiENaGKgrMfEXxlFt2p5GvSiaIG2a d5b3eDA2nnfCP3sZMHYXpqvcpK0xPETvIlet8KoU8teFIELxVZYHM030FaonTTqV2fc8qIZqpy6 S6xkTkhiSqV+nexMdCOWr0yaQO1O/M1/kPKDYfyPJP51XVIZ3ROJn0dFitHExECBATaKrF/rwkC Otest+XeJdc2VC+iTcfRvfuRpoRssPNHpALbWsQJpLqqBVGbsLxDTtTYckG7rEJar7vEHduQ+gU 9aS4iosgOMJwl1mOdXpCRspfUdUWtYyQJAFN8koA804aklYWTOX3crO5dwTd6XwJKyED9gRaYBa mfYumyXyduzjnr/bYO5YEQzzHt9jBtFabVobj0btCiJ/rBdQ5texQJMI25kW549ZmKIaaL//TOK 4dcoJRMUdcqw/O/BLqDJVe2tZxTQ== X-Google-Smtp-Source: AGHT+IHmDqkqWJ4cBL6EIyssI/vAVsIRgr+fKOw3ABPhay5rVVbLQ0/kllfx5VmeHkJX+iBkkymQXg== X-Received: by 2002:a5d:64e4:0:b0:429:927e:f2d with SMTP id ffacd0b85a97d-429bd69fd97mr30084f8f.38.1761839273935; Thu, 30 Oct 2025 08:47:53 -0700 (PDT) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952d4494sm33230465f8f.21.2025.10.30.08.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:47:53 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Len Brown Subject: [PATCH 1/5] ACPI: scan: replace use of system_unbound_wq with system_dfl_wq Date: Thu, 30 Oct 2025 16:47:35 +0100 Message-ID: <20251030154739.262582-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030154739.262582-1-marco.crivellari@suse.com> References: <20251030154739.262582-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 enqueue 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. system_unbound_wq should be the default workqueue so as not to enforce locality constraints for random work whenever it's not required. Adding system_dfl_wq to encourage its use when unbound work should be used. The old system_unbound_wq will be kept for a few release cycles. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- drivers/acpi/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index ef16d58b2949..e0c0b5a50d26 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -2397,7 +2397,7 @@ static bool acpi_scan_clear_dep_queue(struct acpi_dev= ice *adev) * initial enumeration of devices is complete, put it into the unbound * workqueue. */ - queue_work(system_unbound_wq, &cdw->work); + queue_work(system_dfl_wq, &cdw->work); =20 return true; } --=20 2.51.0 From nobody Sun Feb 8 09:11:01 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.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 C6A3723D7E3 for ; Thu, 30 Oct 2025 15:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839278; cv=none; b=gUeHAIufc5BTYrzK6PdoOPpPSWLdC7NF8Wzt/0zFPiHH0LwP0AH1SNVcc7etNRxpDtijmvcCVLEg4Tb4C0MEO7KPyo8a5vFfZYOaCezVzwVBU+36jmm7HKPhBi7y6D66yI6z6vT9Q2mJHk4TSG40NZWKakF7TctCBkXjkBXCWfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839278; c=relaxed/simple; bh=rZ5kBwXxvaDt2BMbcVF0+veZbJzLSOJtP3lgRZMOnz8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ky90OqTwfuV7XcIK8n0TBR6mTtYRT/pgcLCg9zqwfLCpV9BUuEpwH+9Bh9miRuf2Tny0k5bVV8ydRSwEttlaoEci9wwp+PN82uMYDTfSaH4TJA5S7k9qU47WoLK5a0VzNIUxl5Y24hz74iVDdHS0U7agcso8J5f76iB4GW2kvOg= 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=a7RXwf1u; arc=none smtp.client-ip=209.85.221.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="a7RXwf1u" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-427084a641aso1009561f8f.1 for ; Thu, 30 Oct 2025 08:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1761839275; x=1762444075; 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=cKjLkJX2ivVfrTT2riKqUS+oMXr5sjkkm9myJlL5OtQ=; b=a7RXwf1unOg68jpKCn9x/k+2salVh/g0WirsNygnnD7SRef6+p8gCUVI/O7ZCkrNnS MRW2UljlQJFqmt5Gz5lldtqN5LrgVK6HoDxP/vVE6ORXaxLKpYQCtohInHG7zUz7Pl/m I5nkyQlBm/lH3AGEg4bmh1jfP9vCPMbIowBsnS2mMLCijjX035/N1q+/injn4p4Iihau 79IrbaT68xHsdZPEiFqgYQMb7YSqsovKUnb0OgkE3a+jpbDv+tCb1ZZaoQnZ0c9cTYPH u6K4GF02LIB2TeCACzQwdFq9Dhqp+tQgY9JPu8Rgs5VP5cl9nzju0nAtBUkjs0fFUVpX ur4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761839275; x=1762444075; 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=cKjLkJX2ivVfrTT2riKqUS+oMXr5sjkkm9myJlL5OtQ=; b=bNAwOGy0qWa2tb3fr50t3bX1GkW4qAznMYSm7UjAn3vJc0HxszvVun4jNNpxmPdeKz Puwt8hhNsZeMAGEdIq50S3tUN5Hurze6OXBwwVya3FPRT+y+z8eIr0EvVh3tlmK2y4iB nDSOvckYgWZ4xzh+7D5I5s6cp/BCbmmq0InY0fRYIxkp6sTwJrqxuw4rbyVaYpnDEQqT J8t1uD8ldywghNOnGZYPacrlQiRuZLwiylmIm9os+0q2z/M3Yf2lApmIJMVNPIN6dk7J LwA/ICu7tCNqWZ0G4GCBK53tOu14j8unXQ4nBmq93A812vJyvp/Ur/S5cDBUzf88VmsT vIQA== X-Gm-Message-State: AOJu0YyRxuV3H3uMx+viiFZEsuJkoRJ17/K9NRdCI1GhiAp6kfMaDsAc Z4Zxs8/UKZMnnWJYRHC/BYObMiyAbqoBxvgQvhUIFrITQ/P9H7oqA8kVxuNPH1WFNJLREMdx3qY jq7rz X-Gm-Gg: ASbGncvT3pVr0zj3nheHAPfojtdw83lJeExBSJJZnSAwAz/o2ajUlMvRpauM3Fn9y2H CB48hZFaeeaEOvEPhHTCWA14oMVHyaslcKEDj6U9R35mqF3bTkOLevpOOU2AzuMH6MritzrJzTJ 2yHf3Zh+YjCzBCbod88vVFDnQcEw5+Q0zANXjSw8RJosxK3i802HUkxn7NIKVDeWrnvUdWQx6xe nOSmw2/DRb7jEY23Q6qloWjUzPjbkIFaMn7M3hY/wl8kvGd8/frgWmAGGsgDTT6KhmwqxBEW8km xOgnZy51iUJbvplOwi1KF4jsM2SkU7m94BXGHP6KBnlskCmtgIe0dQDPSu6f7y9vaNx5tm2kaYh 9YT5zgcTQa/VcfM2WJ5cFIbPZ0j9528FFLd9Lx/WT9ZMQ2wdan2+hg3iSMBQ+SDS8grAD++I8k3 qnxNW/A6mM4R2zLnH9hF6nq0woVw== X-Google-Smtp-Source: AGHT+IE5s+Lf9wcOpZOtCH5Tt/5Y2/EehbblVu3uT0e68kjERO0vfqRCRcYIbE+J21bs7leTY3ELdw== X-Received: by 2002:a05:6000:186c:b0:429:b703:ad97 with SMTP id ffacd0b85a97d-429bd6de678mr15906f8f.57.1761839274731; Thu, 30 Oct 2025 08:47:54 -0700 (PDT) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952d4494sm33230465f8f.21.2025.10.30.08.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:47:54 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Len Brown Subject: [PATCH 2/5] ACPI: OSL: replace use of system_wq with system_percpu_wq Date: Thu, 30 Oct 2025 16:47:36 +0100 Message-ID: <20251030154739.262582-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030154739.262582-1-marco.crivellari@suse.com> References: <20251030154739.262582-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 enqueue 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. system_wq should be the per-cpu workqueue, yet in this name nothing makes that clear, so replace system_wq with system_percpu_wq. The old wq (system_wq) will be kept for a few release cycles. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- drivers/acpi/osl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 5ff343096ece..a79a5d47bdb8 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -398,7 +398,7 @@ static void acpi_os_drop_map_ref(struct acpi_ioremap *m= ap) list_del_rcu(&map->list); =20 INIT_RCU_WORK(&map->track.rwork, acpi_os_map_remove); - queue_rcu_work(system_wq, &map->track.rwork); + queue_rcu_work(system_percpu_wq, &map->track.rwork); } =20 /** --=20 2.51.0 From nobody Sun Feb 8 09:11:01 2026 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 9565C35970B for ; Thu, 30 Oct 2025 15:47:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839279; cv=none; b=mUWj/aB15cb1+bG2qMPCIEqGL8RkskE7kXdBE3po8CrYqwgabug3RmddwDkIwBHWM64ZKDr8HPbhu4MWLf3OUi4eN6Hc4pKMvVVbgpFTYz+6gklU3FKnzMTpEqkdPKRrKLD/ulrpT6YJOdk/AueuoBRhNMXhmriNScx3vJDwVs4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839279; c=relaxed/simple; bh=x6Jmgz7kV0VtWAu8fu5Me/0BmZbSfEXouiezE/Fn2eA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QX/JgedlkwU8P6IU1SmbTiWqdR0FNf50lJCqaN1ssEe8N4HMjWkLUXfOPJ/Qqbo3EZ5M6Rtiq7cN3Xryubz9/t3Fi546Y3HVya/djd5oiBf9xq9GO9rpXvBeWNb5ogyUy9rW5K4iPYX53elDwN9nd6/ZB0uQ8DOkvqCHx8DrZu4= 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=euOyBBWw; arc=none smtp.client-ip=209.85.221.46 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="euOyBBWw" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-429b7ba208eso586582f8f.1 for ; Thu, 30 Oct 2025 08:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1761839276; x=1762444076; 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=oXy7dakDLCk8jvSrBK5+P+LY5BhZuaHlKUiBvDFl9N8=; b=euOyBBWwCOvZyAJx04ToCfke5r355HvV0/89KHupr0ZoBV+SFK2/YwpB9eQK1fPohM GvwXRt/6B58ESmRliNt0cPq6dqtZeJJB12HQ1h0JMBGOH9pc7EiE2szr4v+MqmyZfFKX gotkNmI6xCkMiCqNsfpj8YbKQE1diYUVdW9AymYKXSfCt/MB+bLiP5gwfr2hIh3MfJQ0 F1B1O+unzUweXTRlU1eMFfQBi87jWbIj3pvFk/OyKYOx5xsO7L5VAlaaiIwJYWpEFGXc y6gs8tbm31oXXcm4qUMKCOXNYvM2Bi7BO/Y+9qotvdhrbUg9IvXxsnDNUUFUohRNsEKz c94A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761839276; x=1762444076; 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=oXy7dakDLCk8jvSrBK5+P+LY5BhZuaHlKUiBvDFl9N8=; b=tSbMIRtcxtYu76p/jcCogtn41DFc7wvMjVEy+h3XbTl+u5hkWIJTJGOFQu+Lh9TZtp Q3wdrlIr2sC5gl3flix992vofcl9fldXyxC+tZz5BRUudi0mRutJJ8d11ipoqI/SDRLt IGwREFhbPNZ3TdOq2eB2K7S8AEM/4WbrWBJIBGbiRoZ0E1yLO/XZTUVXIzGcDtnVllWq 6uCWdlNjNzSC83vULZaooZZ/yCvuAz1O7FISa5ARxWN+vsYrVcbeFcLj8CGZ0EUT5wLF rVPP2AKgq/3808KcEkgVE1gc8esLjrO8W4752QGHpDE2Unn29+vJoO07wAC8ImPYGgTl Z/JQ== X-Gm-Message-State: AOJu0YyY3s2wz45kMjeubpsYyuEWou0Hl6nHMr+t/MgpwxS87RFmFctV Jcv2xN629RV7SuKw1DX+ANL4k8IOma9Bw7iMGT4WQqeWFYhYdMkzWxPVusNmJuLTH+4ZzCt3EQj U39rJ X-Gm-Gg: ASbGncvEnqicIPeiWgYzRMS9I0UtTdwnz2LIY2XHLvMmX44UTuvoUqEcQQbapw3kDck 0MmneTmJHFYBXYn+3skvKuDRvd+CaaFQWad8nk4VQPcbpOKbEIokAKGJpfcFw73TQpOhob4F/4s SowAJVAm7/+O9/rvnA2JVRd7gpz+D20DE2dhy2TMsoO03Xby7J0zyy30RfqHSUgXAsvRM4fUlC7 SVufDnNjv352WZNGFvC8pJIRukoPtwouzQN+OrXvh2kk4NWO/7R+mMpYaQ+qGJFsk8Q+FjQVMEs NiarA4O9jfPBKbhlLQ78MJGJzHbj3uNQ4UNep3SiK1wbCUkfVRBhUzf9Ozif5KyEtuaCn/Cc9mc eBidy3XZjKysIwvvChveZBNyaIuDGMbX+CZg4yueBA5xttA8k4kPnLNhjq3fZmoQPcZbARcVV3P Idd7vp1zfqMc7AIVA= X-Google-Smtp-Source: AGHT+IFpbJXmONDXqy8URpoDE2bukqEzjx2Yz0ZfSH27dYfjypq+STqGcJyBnSPnqHPqYEfzLHpSvQ== X-Received: by 2002:a5d:5f43:0:b0:427:7d5:e767 with SMTP id ffacd0b85a97d-429bd6ac817mr32343f8f.42.1761839275608; Thu, 30 Oct 2025 08:47:55 -0700 (PDT) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952d4494sm33230465f8f.21.2025.10.30.08.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:47:55 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Len Brown Subject: [PATCH 3/5] ACPI: EC: WQ_PERCPU added to alloc_workqueue users Date: Thu, 30 Oct 2025 16:47:37 +0100 Message-ID: <20251030154739.262582-4-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030154739.262582-1-marco.crivellari@suse.com> References: <20251030154739.262582-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Currently if a user enqueue 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 consistentcy cannot be addressed without refactoring the API. alloc_workqueue() treats all queues as per-CPU by default, while unbound workqueues must opt-in via WQ_UNBOUND. This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they=E2=80=99re needed= and reducing noise when CPUs are isolated. This change adds a new WQ_PERCPU flag to explicitly request alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn=E2=80=99t explicitly specify WQ_UNB= OUND must now use WQ_PERCPU. Once migration is complete, WQ_UNBOUND can be removed and unbound will become the implicit default. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- drivers/acpi/ec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 7855bbf752b1..59b3d50ff01e 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -2294,7 +2294,8 @@ static int acpi_ec_init_workqueues(void) ec_wq =3D alloc_ordered_workqueue("kec", 0); =20 if (!ec_query_wq) - ec_query_wq =3D alloc_workqueue("kec_query", 0, ec_max_queries); + ec_query_wq =3D alloc_workqueue("kec_query", WQ_PERCPU, + ec_max_queries); =20 if (!ec_wq || !ec_query_wq) { acpi_ec_destroy_workqueues(); --=20 2.51.0 From nobody Sun Feb 8 09:11:01 2026 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 76C223655C4 for ; Thu, 30 Oct 2025 15:47:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839280; cv=none; b=B2/iSnRDL4GZWXD9P1U/3iiQDhWGMehXWY8M+ux8czAwN105klYuhTyAqF1OmbGSmbsDkaKDn8gehRCkQmM3j0qn6H08iC7FUuru+QPudJxE9cHW1oAT/5TZoOmqleWIg3M7f1cRBwLvmQPYBEXe8atK5PPHNUNchv/lzaDrh+4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839280; c=relaxed/simple; bh=dj4JgxYSsx9iEnxdLQ5jxXbS7kC+kfcSZq1bbTHwdIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AKm4NlfZ+J0OxBkb4EauOMPsEdCAP4PNNICoG/tPnPGjK7KHV7o+80yT6jm3glR4BFeEMJjllaJyp6OMQpeTgkEI8vB8NDubtX8gW+K/YVuSeJVq/0RDX5TQptosMgzHz8b7ShJrhnkvuKO2tvJd8MjPA2GIL9J8AxxnmaYvQ8Q= 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=OYqcXIB0; arc=none smtp.client-ip=209.85.221.46 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="OYqcXIB0" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-429bb95a238so360039f8f.0 for ; Thu, 30 Oct 2025 08:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1761839276; x=1762444076; 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=1JA5tH0/jN6QofZu1XRi2irHFU4Wf8X4Ks8QpkT31AM=; b=OYqcXIB0cWM8c1GgJbJM6dF98vt3GzLky6N+84TJvZIjbQeisHBEzlogtoXd6hx6XW uzRGHeMGlvW2aqzXCd09LdS+tB6vlG12tMhTrv80RpLOUx/5KLgaDcBhdnkcumjNDCwD vDtYo2EYOzgd235VgPtwuJe4Yv3KnNTI0YZ44ihjapCwTtrAnmbTKUs5fC3ZgvE/MBun tiHqK1Fskzu6W5t+NcydRiHmaFitLofjibGWu6+Zz99UQguBmVGbBNtcNk5TK4eoTtHy 0T9CQl4bKuifJ6b8hNllups+f2gSJzPCWpE3tLtsuH/hidVgW05lhscZ3JiDDEv37yKR dTVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761839276; x=1762444076; 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=1JA5tH0/jN6QofZu1XRi2irHFU4Wf8X4Ks8QpkT31AM=; b=AF3SaQ6SNRdJpAWXB5r6/CdmV7rifcEsO5Jdtf5BZ834snuhKPD9zS7KVowRindVMW RMWfLMw/uhN9gfnbluZFBBiuqO7K1Xz8SXyG3mfnb9HbM9Y3CFQst/5r1H3TxF8VW4WG QV89Fa4fTpX7o8aW4NTTB2NNoBlT6H1YCrPUBXMyAghz8uctRWVnB2Np16EDJZsOPT77 czafcxIuvbBJrccwnmNaJozgKGkrCq/3gPjegeRq/JSti6+4AjLK858U1xlXXGhtcP/t u+dStZ0i/s/ttpmCWBTxK7kMvsZHt+QDXYBDxyFRufWPjZUBQop5Aj5A51HAZ7QyKeCR 3Pug== X-Gm-Message-State: AOJu0YyTMdaw5vKcibCn7t+6C5fnxAeZZ8eU3W/JhSzwFgg/JceDx0Us LLT5uRhAZAMkyIqyK8e7pEq7vxrmN2fbx+3HMwkza8uXYnpbcqxFU2mj/FlpVUlVErQHbZloRuj tGBoq X-Gm-Gg: ASbGncuGVFVjc14OXrP+PoT8dwFwqr79Lcx8gkR6Ik/55mqGeMlze/9/QGaUTC4p+Fn LkUeUjx1ddZ8XBvVnQoiVzELcInR0Arf6STdKZ+r6xep3O6T9j4M2Z+ft81prj9BQ2kNunfO2T5 HYKi0u0VgM35wHiwnklhwc/rmuGBFm87q/mC51Nr4/9GDGRNnyhkmomLPxKm7uP/jZJSEzY/F6Q fJt8+XVBsYV+lizyGvtr3UmCkfklT4J+Pnlz3NizSgy/NjlC/gSzwmTaMheT3bFV4MmMRPby4iC SPf5OYP++DDhixQT/MAKrODG+WH8QYwfPz7h0bxaUWOi9hGvxH0vb9XF4bzunwv1Xhsa3QSzZMS qLjLwQ1yirFP/lgFQeo+mYWnnotA/nhF82VN02HWs9ImY15u5j4WLVBMCb/7MZy/lDuv9KeIMyd ITqIZa4yT004QiJN4= X-Google-Smtp-Source: AGHT+IEEYnjir9tDFz2xcJ3AeLq+Hq9UTEgdA54xaGRh8uYrQgEV3tVv37Pq49sexRk8dbqzfWFkSg== X-Received: by 2002:a05:6000:2203:b0:428:3ea7:4473 with SMTP id ffacd0b85a97d-429bd6a48f4mr35234f8f.39.1761839276467; Thu, 30 Oct 2025 08:47:56 -0700 (PDT) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952d4494sm33230465f8f.21.2025.10.30.08.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:47:56 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Len Brown Subject: [PATCH 4/5] ACPI: OSL: WQ_PERCPU added to alloc_workqueue users Date: Thu, 30 Oct 2025 16:47:38 +0100 Message-ID: <20251030154739.262582-5-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030154739.262582-1-marco.crivellari@suse.com> References: <20251030154739.262582-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Currently if a user enqueue 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 consistentcy cannot be addressed without refactoring the API. alloc_workqueue() treats all queues as per-CPU by default, while unbound workqueues must opt-in via WQ_UNBOUND. This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they=E2=80=99re needed= and reducing noise when CPUs are isolated. This change adds a new WQ_PERCPU flag to explicitly request alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn=E2=80=99t explicitly specify WQ_UNB= OUND must now use WQ_PERCPU. Once migration is complete, WQ_UNBOUND can be removed and unbound will become the implicit default. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- drivers/acpi/osl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index a79a5d47bdb8..05393a7315fe 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1694,8 +1694,8 @@ acpi_status __init acpi_os_initialize(void) =20 acpi_status __init acpi_os_initialize1(void) { - kacpid_wq =3D alloc_workqueue("kacpid", 0, 1); - kacpi_notify_wq =3D alloc_workqueue("kacpi_notify", 0, 0); + kacpid_wq =3D alloc_workqueue("kacpid", WQ_PERCPU, 1); + kacpi_notify_wq =3D alloc_workqueue("kacpi_notify", WQ_PERCPU, 0); kacpi_hotplug_wq =3D alloc_ordered_workqueue("kacpi_hotplug", 0); BUG_ON(!kacpid_wq); BUG_ON(!kacpi_notify_wq); --=20 2.51.0 From nobody Sun Feb 8 09:11:01 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 3B90B3655E5 for ; Thu, 30 Oct 2025 15:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839281; cv=none; b=A28jWN3m6c2Qb7RLFIxkC9BY9SbklpIxY5qR+R8k9MwXrnlBmy6fTJmMznbZatwo6KRJedE4oAoun5TRLUI+fWARAX/5YUYqtJDFgqNGH53wdlBvzZqPMQwwvEdRcsHesGiTLhJ59GW++pZMj/IAmY+X9e404Hzy/1NfCtWDeOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761839281; c=relaxed/simple; bh=XJrAeM0bm8IOI+PtKrJkM5ofQWWoG6sG4rQq8LIKX0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AO1z5BfrHa9k9aKTzd3OJ5I/vtxfez7NDjvbHUL6fT6oeg8RaJw4adrQFWv8kOxEBv4hXPveXVR5NTL5mfHq3gL51hdyzGJN6eZAlx04RJPmApihVAAngvzh10Kt2S1Py82yuTzQaSnipygvLOgh1uz+eKjH1dprtNCzNwNIrxk= 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=WAz4PaLg; arc=none smtp.client-ip=209.85.221.45 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="WAz4PaLg" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-421851bcb25so724997f8f.2 for ; Thu, 30 Oct 2025 08:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1761839277; x=1762444077; 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=1EvAdEwVOXpN/RTJbLmUZiFBI5Zw4W1nq/Q+XC07Oog=; b=WAz4PaLg1bZJgv+lXGj4SosOAfcLlPRh3xCK/sL/InmnYo0JXGJ8n/0QGyb7e1Vg0d kiQLhoBLrPPCaP2Ju94e0sWlbRF0l380mClSMQicbAdDSrgHUjO2GUHyEAYskCrVBEum sUUr5wzUwIpNzVMHOi8bYJiTmfzGgxgclLisesItdDai9GrgkwSDCbD5ebKsbUKoY4Pd oZIsKQRAe3ZF/1hJEcF7P8zi0E/q8uoYRLzQHwqNbU2rmBfjnZ46E0K5scAGLjJE9ZKG 5zPnbexlcaLH0DgOW0aMdFhKMbadh8wgwq8NJ5TIAdJDc4EE6OskfT1rGGWg9YB8/kHD SkiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761839277; x=1762444077; 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=1EvAdEwVOXpN/RTJbLmUZiFBI5Zw4W1nq/Q+XC07Oog=; b=Vlm0Nag8ZPBJBaqo5QhjQCHdwBviijbfVEoK4QfmnE8hAbhzFf1cocPu8k/KJ5V5ib jr1QNYCU0BEL1pWUpTBX3TwmWru9F0ZeSUFbeq2bEQt0etkiBbDHHstITtxK5rf9KAP5 hkS1FJ03zv35a7m4MgVp6fzZGgSKNdN8g9ez/IqJ7a0Ob/GDvS5e3W2hJpTrPkshaPyK uzZ+M08HxkKpgtD3/TVg3FL7ZgBK/170rm+oXrXUPVHGSqaytRWeJDA8/9MK4/Ntqy/T v+5CqnJKm4as0H9B/M306A55i9Om+BobAOwTsGgEp/CRogImo776bxR1DMh/xJEleyAo 7YWw== X-Gm-Message-State: AOJu0Yz1mKPw7egNInysa8p3ZapLsPjQay9xzBGea4LHBbYA6ZC65/sU +zcfSylByPH2o11vt3pUP+PV+50ojcBfudp7VbtNdM/oc3h0G/+W8omy+rNSCh27/km6Vq2oIYe ZqkZz X-Gm-Gg: ASbGncsAQmSuzJOjHGDdkau57qHW+tO8rPbYyLrW28D/fH02QkaU27gRa4X1CHshcns dIvM8UXwAHI5NWuq3Y+E7jF07y3ybFoqLIV+4JBnExOsP6aeRt2P6BTxa4oTv7DAl/HdvwjCFcN +YKkzDBsE5XOif+z/hodYHLAY2cU4UvsKQl3Bbc/4e4Q1q1wojHKsjFBdR/lP+XJQ8wfDxG/k+7 i3AoZCmEKp7ttQQvikHfZWuHJTb6tmpmv5prwc1zcShuGfRvRFeE7xB2p/hoBhp2LJno7Gvm6Cf EWCyd74F8SSYCnLStKfsMDfSRfKCbMCTdiQNnGp5Eju3K4SSI7Rs9coU1En88JqVDXL6OWlL0s/ FOMCotyaegzxf3VXsNuEbX3awQlH4Ae+ZTlZpiPFJJ5U/XASCMhA5e2aaF7hVgOUTmfi8yTzsgA SVmLbdE3uJ6HaqgQE= X-Google-Smtp-Source: AGHT+IHv0b72t6uTN5xevmEXlNNhXb865PxInovOLuEzLPLCBQj4iAvE7Apv1laDFcFKTRnG6CgXAg== X-Received: by 2002:a05:6000:2309:b0:426:ed9d:4072 with SMTP id ffacd0b85a97d-429bd680cd2mr43975f8f.21.1761839277284; Thu, 30 Oct 2025 08:47:57 -0700 (PDT) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952d4494sm33230465f8f.21.2025.10.30.08.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:47:57 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , "Rafael J . Wysocki" , Len Brown , Zhang Rui Subject: [PATCH 5/5] ACPI: thermal: WQ_PERCPU added to alloc_workqueue users Date: Thu, 30 Oct 2025 16:47:39 +0100 Message-ID: <20251030154739.262582-6-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030154739.262582-1-marco.crivellari@suse.com> References: <20251030154739.262582-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Currently if a user enqueue 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 consistentcy cannot be addressed without refactoring the API. alloc_workqueue() treats all queues as per-CPU by default, while unbound workqueues must opt-in via WQ_UNBOUND. This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they=E2=80=99re needed= and reducing noise when CPUs are isolated. This change adds a new WQ_PERCPU flag to explicitly request alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn=E2=80=99t explicitly specify WQ_UNB= OUND must now use WQ_PERCPU. Once migration is complete, WQ_UNBOUND can be removed and unbound will become the implicit default. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari CC: Zhang Rui --- drivers/acpi/thermal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 8537395b417b..a511f9ea0267 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -1060,7 +1060,8 @@ static int __init acpi_thermal_init(void) } =20 acpi_thermal_pm_queue =3D alloc_workqueue("acpi_thermal_pm", - WQ_HIGHPRI | WQ_MEM_RECLAIM, 0); + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_PERCPU, + 0); if (!acpi_thermal_pm_queue) return -ENODEV; =20 --=20 2.51.0