Re: [PATCHSET sched_ext/for-7.3] sched_ext: Rename the cid-form cgroup ops to cpuctl_*

Andrea Righi <[email protected]> Mon, 20 Jul 2026 08:29:49 +0200
Newsgroups dev.linux.lists.sched-ext,org.kernel.vger.linux-kernel
Message-ID <al3AXT4K6CuURSxE@gpd4>
On Sat, Jul 18, 2026 at 12:10:27AM -1000, Tejun Heo wrote:
> Hello,
> 
> Two unrelated things go by "cgroup" in the cid form. Sub-schedulers attach
> to cgroups, and the cgroup_*() ops deliver cpu controller events. While the
> ops names suggest cgroup2 hierarchy, they actually operate on the cpu
> controller. The cid form has no users beyond scx_qmap yet, so rename the
> ops to cpuctl_* while the ABI can still change. The cpu form is deployed
> ABI and keeps the old names.

Conceptually it makes sense, cpuctl_* is a more precise terminology since these
callbacks report CPU-controller events.

This breaks existing CID-form schedulers, but I guess it's fine, since we don't
have any user of the CID-form API right now (except scx_qmap, which is in tree),
so we should be fine with that.

Reviewed-by: Andrea Righi <[email protected]>

-Andrea

> 
> - 0001 factors the skeleton open path out of SCX_OPS_OPEN() and adds
>   SCX_OPS_CID_OPEN() so that cid-form skeletons don't depend on the
>   cpu-form member names dereferenced by the compat clears.
> 
> - 0002 renames the ops to cpuctl_* in struct sched_ext_ops_cid and updates
>   scx_qmap, the only cid-form scheduler.
> 
> Based on sched_ext/for-7.3 (7c2cd767705d) plus the cgroup migration
> patchset:
> 
>   https://lore.kernel.org/r/[email protected]
> 
> Tejun Heo (2):
>   tools/sched_ext: Add SCX_OPS_CID_OPEN for cid-form schedulers
>   sched_ext: Rename the cid-form cgroup ops to cpuctl_*
> 
> Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-cpuctl-rename
> 
>  kernel/sched/ext/ext.c               | 36 ++++++++++++++++++------------------
>  kernel/sched/ext/internal.h          | 25 ++++++++++++-------------
>  tools/sched_ext/include/scx/compat.h | 30 ++++++++++++++++++++++--------
>  tools/sched_ext/scx_qmap.bpf.c       | 22 +++++++++++-----------
>  tools/sched_ext/scx_qmap.c           |  4 ++--
>  tools/sched_ext/scx_qmap.h           |  2 +-
>  6 files changed, 66 insertions(+), 53 deletions(-)
> 
> --
> tejun