Commit 30d224b
committed
sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group()
JIRA: https://issues.redhat.com/browse/RHEL-111810
commit 33796b9
Author: Tejun Heo <tj@kernel.org>
Date: Mon Jun 16 10:13:25 2025 -1000
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: 8195136 ("sched_ext: Add cgroup support")
Cc: stable@vger.kernel.org # v6.12+
Signed-off-by: Phil Auld <pauld@redhat.com>1 parent 7f80c0d commit 30d224b
3 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8582 | 8582 | | |
8583 | 8583 | | |
8584 | 8584 | | |
8585 | | - | |
| 8585 | + | |
8586 | 8586 | | |
8587 | 8587 | | |
8588 | 8588 | | |
| |||
9022 | 9022 | | |
9023 | 9023 | | |
9024 | 9024 | | |
9025 | | - | |
| 9025 | + | |
9026 | 9026 | | |
9027 | 9027 | | |
9028 | 9028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4056 | 4056 | | |
4057 | 4057 | | |
4058 | 4058 | | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
| 4062 | + | |
| 4063 | + | |
4059 | 4064 | | |
4060 | 4065 | | |
4061 | 4066 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
0 commit comments