2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
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
..
autogroup.c sched_ext: Fixes for v6.14-rc2 2025-02-14 11:14:24 -08:00
autogroup.h
build_policy.c sched_ext: Move built-in idle CPU selection policy to a separate file 2025-01-27 12:43:43 -10:00
build_utility.c sched/debug: Make CONFIG_SCHED_DEBUG functionality unconditional 2025-03-19 22:20:53 +01:00
clock.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
completion.c
core_sched.c sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE() 2025-03-19 22:20:53 +01:00
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
cpuacct.c
cpudeadline.c sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2023-10-09 12:59:48 +02:00
cpudeadline.h
cpufreq_schedutil.c cpufreq/sched: schedutil: Add helper for governor checks 2025-05-07 21:17:56 +02:00
cpufreq.c
cpupri.c sched/rt: Fix live lock between select_fallback_rq() and RT push 2023-09-28 22:58:13 +02:00
cpupri.h
cputime.c sched/clock: Don't define sched_clock_irqtime as static key 2025-03-10 14:22:58 +01:00
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_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
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
fair.c - The 2 patch series "zram: support algorithm-specific parameters" from 2025-06-02 16:00:26 -07:00
features.h sched/fair: Untangle NEXT_BUDDY and pick_next_task() 2024-12-09 11:48:13 +01:00
idle.c sched_ext: idle: Refresh idle masks during idle-to-idle transitions 2025-01-10 12:40:42 -10:00
isolation.c sched/isolation: Make use of more than one housekeeping cpu 2025-04-08 20:55:55 +02:00
loadavg.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
Makefile tracing: Disable branch profiling in noinstr code 2025-03-22 09:49:26 +01:00
membarrier.c RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
pelt.c sched/fair: Use the new cfs_rq.h_nr_runnable 2024-12-09 11:48:11 +01:00
pelt.h sched: Move update_other_load_avgs() to kernel/sched/pelt.c 2024-09-11 20:00:21 -10:00
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 docs: Update Schedstat version to 17 2024-12-20 15:31:18 +01:00
stats.h sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE() 2025-03-19 22:20:53 +01:00
stop_task.c sched: Add put_prev_task(.next) 2024-09-03 15:26:32 +02:00
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_bit.c sched/wait: Remove unused bit_wait_io_timeout 2024-10-07 09:28:41 +02:00
wait.c sched: remove wait bookmarks 2023-10-18 14:34:18 -07:00