From mboxrd@z Thu Jan 1 00:00:00 1970 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: 8bit 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 *work) 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); } @@ -3704,7 +3704,7 @@ static void scx_kobj_release(struct kobject *kobj) struct scx_sched *sch = container_of(kobj, struct scx_sched, kobj); 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); } static ssize_t scx_attr_ops_show(struct kobject *kobj, @@ -5087,7 +5087,7 @@ static void scx_enable_workfn(struct kthread_work *work) 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); /* -- 2.53.0