linux/kernel/sched
Tejun Heo 33796b9187 sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group()
During task_group creation, sched_create_group() calls
scx_group_set_weight() with CGROUP_WEIGHT_DFL to initialize the sched_ext
portion. This is premature and ends up calling ops.cgroup_set_weight() with
an incorrect @cgrp before ops.cgroup_init() is called.

sched_create_group() should just initialize SCX related fields in the new
task_group. Fix it by factoring out scx_tg_init() from sched_init() and
making sched_create_group() call that function instead of
scx_group_set_weight().

v2: Retain CONFIG_EXT_GROUP_SCHED ifdef in sched_init() as removing it leads
    to build failures on !CONFIG_GROUP_SCHED configs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 8195136669 ("sched_ext: Add cgroup support")
Cc: stable@vger.kernel.org # v6.12+
2025-06-17 08:19:55 -10:00
..
Makefile
autogroup.c
autogroup.h
build_policy.c
build_utility.c
clock.c
completion.c
core.c sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() 2025-06-17 08:19:55 -10:00
core_sched.c
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq.c
cpufreq_schedutil.c cpufreq/sched: schedutil: Add helper for governor checks 2025-05-07 21:17:56 +02:00
cpupri.c
cpupri.h
cputime.c
deadline.c A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
debug.c - The 2 patch series "zram: support algorithm-specific parameters" from 2025-06-02 16:00:26 -07:00
ext.c sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() 2025-06-17 08:19:55 -10:00
ext.h sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group() 2025-06-17 08:19:55 -10:00
ext_idle.c sched_ext: idle: Skip cross-node search with !CONFIG_NUMA 2025-06-03 08:22:27 -10:00
ext_idle.h sched_ext: idle: Explicitly pass allowed cpumask to scx_select_cpu_dfl() 2025-04-07 07:13:52 -10:00
fair.c - The 2 patch series "zram: support algorithm-specific parameters" from 2025-06-02 16:00:26 -07:00
features.h
idle.c
isolation.c sched/isolation: Make use of more than one housekeeping cpu 2025-04-08 20:55:55 +02:00
loadavg.c
membarrier.c
pelt.c
pelt.h
psi.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
rt.c sched/rt: Fix race in push_rt_task 2025-04-08 20:55:55 +02:00
sched-pelt.h
sched.h sched_ext: Changes for v6.16 2025-05-27 21:12:50 -07:00
smp.h
stats.c
stats.h
stop_task.c
swait.c
syscalls.c sched: Bypass bandwitdh checks with runtime disabled RT_GROUP_SCHED 2025-04-08 20:55:54 +02:00
topology.c Power management updates for 6.16-rc1 2025-05-27 16:48:47 -07:00
wait.c
wait_bit.c