Skip to content

Commit bc08b15

Browse files
committed
sched_ext: Mark SCX_OPS_HAS_CGROUP_WEIGHT for deprecation
SCX_OPS_HAS_CGROUP_WEIGHT was only used to suppress the missing cgroup weight support warnings. Now that the warnings are removed, the flag doesn't do anything. Mark it for deprecation and remove its usage from scx_flatcg. v2: Actually include the scx_flatcg update. Signed-off-by: Tejun Heo <[email protected]> Suggested-and-reviewed-by: Andrea Righi <[email protected]>
1 parent e776b26 commit bc08b15

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

kernel/sched/ext.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ enum scx_ops_flags {
163163
/*
164164
* CPU cgroup support flags
165165
*/
166-
SCX_OPS_HAS_CGROUP_WEIGHT = 1LLU << 16, /* cpu.weight */
166+
SCX_OPS_HAS_CGROUP_WEIGHT = 1LLU << 16, /* DEPRECATED, will be removed on 6.18 */
167167

168168
SCX_OPS_ALL_FLAGS = SCX_OPS_KEEP_BUILTIN_IDLE |
169169
SCX_OPS_ENQ_LAST |
@@ -5213,6 +5213,9 @@ static int validate_ops(const struct sched_ext_ops *ops)
52135213
return -EINVAL;
52145214
}
52155215

5216+
if (ops->flags & SCX_OPS_HAS_CGROUP_WEIGHT)
5217+
pr_warn("SCX_OPS_HAS_CGROUP_WEIGHT is deprecated and a noop\n");
5218+
52165219
return 0;
52175220
}
52185221

tools/sched_ext/scx_flatcg.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,5 +950,5 @@ SCX_OPS_DEFINE(flatcg_ops,
950950
.cgroup_move = (void *)fcg_cgroup_move,
951951
.init = (void *)fcg_init,
952952
.exit = (void *)fcg_exit,
953-
.flags = SCX_OPS_HAS_CGROUP_WEIGHT | SCX_OPS_ENQ_EXITING,
953+
.flags = SCX_OPS_ENQ_EXITING,
954954
.name = "flatcg");

0 commit comments

Comments
 (0)