From: Tejun Heo <tj@kernel.org>
To: Cheng-Yang Chou <yphbchou0911@gmail.com>,
Andrea Righi <arighi@nvidia.com>
Cc: sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
Chia-Ping Tsai <chia7712@gmail.com>,
kernel test robot <lkp@intel.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: Fix build errors and unused label warning in non-cgroup configs
Date: Sat, 21 Mar 2026 09:10:03 -1000 [thread overview]
Message-ID: <49aeada41a0e78e9673f053806321df3@kernel.org> (raw)
In-Reply-To: <ab6sqIW4p8QKYQXA@gpd4>
Hello,
On Sat, Mar 21, 2026 at 03:35:20PM +0100, Andrea Righi wrote:
> This looks like a false positive, the kernel test robot likely tested
> with a manually crafted config, so I think we shouldn't apply this
> patch.
It's not a false positive. CONFIG_SCHED_CLASS_EXT doesn't depend on
CONFIG_CGROUPS in Kconfig, so SCHED_CLASS_EXT=y with CGROUPS=n is a
valid config. I reproduced the build failure using the bot's config.
The issue is that CONFIG_EXT_SUB_SCHED is def_bool y depending only on
SCHED_CLASS_EXT, so it's always on. But EXT_SUB_SCHED fundamentally
needs cgroups (cgroup_path, cgroup_get, cgroup_put, cgroup_id, etc.),
so the missing dependency is there.
Cheng-Yang, can you send a v2 with the following approach?
1. Add CGROUPS dependency to EXT_SUB_SCHED in init/Kconfig:
config EXT_SUB_SCHED
def_bool y
- depends on SCHED_CLASS_EXT
+ depends on SCHED_CLASS_EXT && CGROUPS
2. Guard err_stop_helper with #ifdef CONFIG_EXT_SUB_SCHED (only
jumped to from within CONFIG_EXT_SUB_SCHED code):
+#ifdef CONFIG_EXT_SUB_SCHED
err_stop_helper:
kthread_destroy_worker(sch->helper);
+#endif
err_free_pcpu:
3. Guard cgroup_get/cgroup_put in common paths with the existing
CONFIG_EXT_GROUP_SCHED || CONFIG_EXT_SUB_SCHED pattern (matching
the root_cgroup() / sch_cgroup() stubs):
err_put_cgrp:
+#if defined(CONFIG_EXT_GROUP_SCHED) || defined(CONFIG_EXT_SUB_SCHED)
cgroup_put(cgrp);
+#endif
and:
+#if defined(CONFIG_EXT_GROUP_SCHED) || defined(CONFIG_EXT_SUB_SCHED)
cgroup_get(cgrp);
+#endif
sch = scx_alloc_and_add_sched(ops, cgrp, NULL);
I verified this builds clean with both CGROUPS=y and CGROUPS=n.
Thanks.
--
tejun
next prev parent reply other threads:[~2026-03-21 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 7:05 [PATCH] sched_ext: Fix build errors and unused label warning in non-cgroup configs Cheng-Yang Chou
2026-03-21 14:35 ` Andrea Righi
2026-03-21 17:31 ` Cheng-Yang Chou
2026-03-21 19:10 ` Tejun Heo [this message]
2026-03-21 23:26 ` Andrea Righi
2026-03-22 6:43 ` Cheng-Yang Chou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49aeada41a0e78e9673f053806321df3@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=chia7712@gmail.com \
--cc=emil@etsalapatis.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.com \
--cc=yphbchou0911@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.