From nobody Sun Jun 14 11:27:29 2026 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 2B22917DFE7 for ; Thu, 2 Apr 2026 13:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775137324; cv=none; b=UrKL4dlQpbz1dER6szlPxMEdf7PDdvfntGMIuJ7qg+O6+1ye6TsZkcfF3CrfJc2Xj4wu3uH+/z1fr99QL0fVzWhzdRNzWzoTp3TfRXmUJwD944dhAvdZqZ7EKBFYDaihxZcHRJWFa/yoM3CjhQTyHNI71hfJCfOshVCOB1Xi/ko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775137324; c=relaxed/simple; bh=8IM9m4JEZi/A3JDK+Dy/eracycSpPWsTHoz8ukGJXFQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i4bXSW7+MhbgOJGx4Ch+YI6A+1jdRdCn8OpepBp5Z990caeoUpRNIZsexCF+GXMDBm0Lne/sI2CbGlnFWxhI/ysgKdWwBs7HbzDX95sq+v8oqYWD50cY4Asi1tu4CDPC1zzhUfDQofQP6Z/BbGJCxqpq60xSYdX9wtER8HLHRZQ= 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=XC9pSI6N; arc=none smtp.client-ip=209.85.221.53 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="XC9pSI6N" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-43cfd832155so516649f8f.1 for ; Thu, 02 Apr 2026 06:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775137321; x=1775742121; 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=1dUTghTze/WTztkcopZPh/rYMJvaVSP3VzX+VVmIOZI=; b=XC9pSI6NI7ddl/MIbDi2mAFDxBmdRRx9eMhAQ5KCCLhmszhJUpMgDWHsFvtGB2nnJL m3vSVse0cxe+yIBFN5Nrhgtv9O7/0Hre2n77otEPdWrc+Pf2UtNMEhg1E9ALr/1QQ8tj WnltmB06bo/dlTa61ntk5EOfIL8AfPD4l4zTQX6AoCB+4tnuXiWXH0u0P+WaBBdkzZaF ndix5J0Z4+EUjFgM/e6ngIH7rWUu8yVHRXjBM/httrJyCy8KGAF0PZBroQS18WJeDvRi xFUIgqtcNWENUq0e0EV9Y3lifrxHsXs8WjL2kMlxCkcUZf1abaAMZiQN2pUp6W+klAxq OdpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775137321; x=1775742121; 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=1dUTghTze/WTztkcopZPh/rYMJvaVSP3VzX+VVmIOZI=; b=Wb9e8D4yFmOmmeSrAZGZF9+X4xQj//fDzpiIj1lpi5apc6KWLQZSABtQ54Ny6mXk+q bt+NC6s2Xcjw5mXbHEFvgY9ACb6Ktf/NTOYsVzUx7Eu1YgepH8sG34Q/UGxuW5XesUpy vp8K7RvqNA3hgsK9iwHuyVPQXro0VRsMatKZzIzHQwuQdxOMUqCTsxbwRE6isJsJM1gJ JHgDxjsAyEuUSBisB62qBMGRIF5IZYqZZEioFHqH5+56rs9LYx2tyyCxp6FL2cTjOd+2 hWJHUB/ZmXeEnbyI3135zqDq9Hns96lnxDX6cR8TutbQUlFU9ahXw5z8YkdN5taVS2sK 4pFQ== X-Gm-Message-State: AOJu0YyFQQVKXI0nT5KDDUWFDRnQ/iTyrAQaoQ+xRyM4f+RZODj++Ryi 9gts+DQkQXwzyF4eb25AIV1qUXZfy38QAonuM3rgaml3xsGr9olvW8t8Kop++hcC19Nt2m40fhk FotTCeJ0= X-Gm-Gg: AeBDieueD+K2UI90jsD/kNUv6EPrEB92lwbgSrjUpvttXIWiuQPppXWofpyD+IKWp0D oKr1p4u02bBBZmvR/FF1RpjQ+EQUmvmL44lfkRuDzTj3lvR0kQFycnU+0+Zsp4fWWT8jj+9w/Dg pLFQeB7QeWkZpr/WohgSEGWZ4sISD+su8LozT3FxAUtwu/nSR9dGZRvPvAij5Unt22LbSpULry7 h2x/62Dq41JT/0dVGhbFcu2qVEsC3mONuB7ulEo8WExBE9btwr+Z1BGIBa9J6L7k96zW1wyUbk2 aMgOzkF7SSyurDg2WDsOnjnePF8Ufe1ruYckEZ5nEw7MYCXtkLw59UOJPLQbiBhi9dMfpNBJe4h pbbX0Dtqg+gk/Zolsww2mfCeTS7+KNGiKnIigJsAmc/lP4ruZds9LIrRcFIze53sJDd8juaXQz/ pdQliKGNdNDSXgiBnHaBmL9mBSaTsKF7yQbqpEw2sx6+YPqFI= X-Received: by 2002:a5d:5f46:0:b0:432:8504:8d5b with SMTP id ffacd0b85a97d-43d150e0074mr13894376f8f.50.1775137321153; Thu, 02 Apr 2026 06:42:01 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4d2738sm8043312f8f.24.2026.04.02.06.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 06:42:00 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Subject: [PATCH v3 1/2] sched: replace use of system_unbound_wq with system_dfl_wq Date: Thu, 2 Apr 2026 15:41:46 +0200 Message-ID: <20260402134147.285401-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260402134147.285401-1-marco.crivellari@suse.com> References: <20260402134147.285401-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, 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. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 496dff740dca..aaef6f5292aa 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5681,7 +5681,7 @@ static void sched_tick_remote(struct work_struct *wor= k) os =3D atomic_fetch_add_unless(&twork->state, -1, TICK_SCHED_REMOTE_RUNNI= NG); WARN_ON_ONCE(os =3D=3D TICK_SCHED_REMOTE_OFFLINE); if (os =3D=3D TICK_SCHED_REMOTE_RUNNING) - queue_delayed_work(system_unbound_wq, dwork, HZ); + queue_delayed_work(system_dfl_wq, dwork, HZ); } =20 static void sched_tick_start(int cpu) @@ -5700,7 +5700,7 @@ static void sched_tick_start(int cpu) if (os =3D=3D TICK_SCHED_REMOTE_OFFLINE) { twork->cpu =3D cpu; INIT_DELAYED_WORK(&twork->work, sched_tick_remote); - queue_delayed_work(system_unbound_wq, &twork->work, HZ); + queue_delayed_work(system_dfl_wq, &twork->work, HZ); } } =20 --=20 2.53.0 From nobody Sun Jun 14 11:27:29 2026 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 5A87E313298 for ; Thu, 2 Apr 2026 13:42:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775137325; cv=none; b=ePQCSZjL/RYE+8OwCJelMQnxXPyw3iPJasV+ghYDX6CVeXOv4QkWyXSTIlsdpQM/KfK6xJrB9Z0JKbe+YFWaqC5752fwfmzwBZdwDsuczBxC90EL/0s9BcP7jdM0ldQhoJ2h+sNRSgEtgkClXspNMoroXhvkh/kD4k69LOCiTfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775137325; c=relaxed/simple; bh=8572KaPeb+1b5jQjNVRqmw+q/77fLDpWwo4ppR+/R9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=umNeIFZuzeaF4OD8V/nSZns86NhZtAj+Kr9o5vAhSY8oWHSiTfsAJbzNoVdZmAxZl4k0Z4Y0pMep6py1vja8rKtnUMXsTSZNzZEOKcn5srRYkLH7ClDjWVMy7z8fVkTcdMFh7/gGAcYFDEkaQ5HRWwTo640WF0nKRORmuD7QjV0= 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=eezlYtu/; arc=none smtp.client-ip=209.85.221.54 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="eezlYtu/" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43cf73bbfbdso601070f8f.1 for ; Thu, 02 Apr 2026 06:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775137322; x=1775742122; 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=EzdIm9mmL8v48G2Ac7CX97XtUcZEbL9KWQpbPOW6Lik=; b=eezlYtu/ctZFDHeoiy1FogrKSiJA0lwAECYbRHAILatHCrhozGx+4gylps3S6lvsYx e8TZOIJatbMprfY8A5AIeX2LwQOf8pJWeXqWRGMs/i7d9/0PBoFiuhjfxQNF1eX2e76S Gx/VwiEtJJRwDCW6qx9GEXrVvjyyUy88FnbSITCFztFfhz9AUod/Gy8vM7ERRTYeiW+R DV657Ut30LCXy1/SJLOXbiXUwlqiGrTEkr1YIUrxvZXtAz/UIryjO/pwqucwE85LGo5U CV2wzGsWp8GBKgIurFRUh4SzSj/fsmwb+kPZRWoM7xq8hEGhl8G296AvxZKwTpVCvooe 9T2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775137322; x=1775742122; 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=EzdIm9mmL8v48G2Ac7CX97XtUcZEbL9KWQpbPOW6Lik=; b=mBObw6J0QYhYGAkUIj7etki98zVVFOBIQprJWpWkooIx59Y2l1TKR5CgBlQ88dAnEl r2+LIeI6QQXM67YbLAEqPPxOLNUdIih3JX7P1unDIs3m3gjaR6hEu7JD4AWw/vjOrWhv 0oH4iwQqgvKudQN8F0EDp8A515eldWqTc36NwL7EzDU8y1l7Ps8H5uLtVtNa1pwxhbZh ztgrhMPMCLTmvqzLAzvZgH0fN/WQQmVUebCZrRiRa/mFr+yEcmsQX41+nav79TpURCKs RQdKA49BKEQBm8eMLS9dEO/AlLytbi4ZY9BNh8FVCLarqbZlrOgsOYclLNOjFaaUdkKr 0yMA== X-Gm-Message-State: AOJu0YzwQYAFTIVewR+c6hAGMwPAPYraBiTCYYhbbWm7N9SAQNl1I77E 7OeVy5xYkpoIME9uxIBTgu6+txP/XGfxlN8e4Pqe5/LdjJ8ICsJXOhjxoAK7w/fthTWIa5PCFvO wk2V3+kQ= X-Gm-Gg: AeBDies7BY8+M1oK1iOZj7dzt24X/z2o2UcyD0dkWo8Vp5s32y2DM1+zffJtbZJNbeC j8IG+vzwh8e3oTYsYQjzMQt68M0ZBHtCWRyK46U8rT8mLijbrTlDXjRKjUIaUK2NYh2xD9oiKme vh0op4qS7cqbmeEwIS9XPh502hpgNaxeZW53+7uPCwnRRs3zjXW5UqpbMyMFNNBPeVj30Bg+1Qu 8oIv084PeeGHSH9ceAMUvRIogG3OdAu7RrpE6eeWdPWIVQk41I8QhHjN73ZTOnZe8NVDHV693v3 o166f/nyRM+w4i7QKFtgIeOhsbwIlJxtzGHFsoOOXy7dYszUh4C9Rz3z9GSp02/e46+u/ODKI2b y6iZbSS/BdcwMErLIW5qu4avT2U0lrbH6iDdxJJJhoMS6ZIQvxwDzxlCLfTKGgaqiNrKGyCGDvx DajClbVw8ryl5XdD5F0q25tp/UImGLn96LN+ndscVz0WeFc/E= X-Received: by 2002:a05:6000:24c1:b0:43b:3cdc:941f with SMTP id ffacd0b85a97d-43d150869ddmr15163159f8f.17.1775137322382; Thu, 02 Apr 2026 06:42:02 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4d2738sm8043312f8f.24.2026.04.02.06.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 06:42:02 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Subject: [PATCH v3 2/2] sched_ext: Replace use of system_unbound_wq with system_dfl_wq Date: Thu, 2 Apr 2026 15:41:47 +0200 Message-ID: <20260402134147.285401-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260402134147.285401-1-marco.crivellari@suse.com> References: <20260402134147.285401-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, 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. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- kernel/sched/ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 26a6ac2f8826..95791a5ebb0d 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -2765,7 +2765,7 @@ static void scx_watchdog_workfn(struct work_struct *w= ork) =20 cond_resched(); } - queue_delayed_work(system_unbound_wq, to_delayed_work(work), + queue_delayed_work(system_dfl_wq, to_delayed_work(work), READ_ONCE(scx_watchdog_timeout) / 2); } =20 @@ -3704,7 +3704,7 @@ static void scx_kobj_release(struct kobject *kobj) struct scx_sched *sch =3D container_of(kobj, struct scx_sched, kobj); =20 INIT_RCU_WORK(&sch->rcu_work, scx_sched_free_rcu_work); - queue_rcu_work(system_unbound_wq, &sch->rcu_work); + queue_rcu_work(system_dfl_wq, &sch->rcu_work); } =20 static ssize_t scx_attr_ops_show(struct kobject *kobj, @@ -5087,7 +5087,7 @@ static void scx_enable_workfn(struct kthread_work *wo= rk) =20 WRITE_ONCE(scx_watchdog_timeout, timeout); WRITE_ONCE(scx_watchdog_timestamp, jiffies); - queue_delayed_work(system_unbound_wq, &scx_watchdog_work, + queue_delayed_work(system_dfl_wq, &scx_watchdog_work, READ_ONCE(scx_watchdog_timeout) / 2); =20 /* --=20 2.53.0