Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched_ext: Merge branch 'for-6.15-fixes' into for-6.16

Pull for-6.15-fixes to receive:

e776b26e3701 ("sched_ext: Remove cpu.weight / cpu.idle unimplemented warnings")

which conflicts with:

1a7ff7216c8b ("sched_ext: Drop "ops" from scx_ops_enable_state and friends")

The former removes code updated by the latter. Resolved by removing the
updated section.

Signed-off-by: Tejun Heo <tj@kernel.org>

+8 -43
+7 -42
kernel/sched/ext.c
··· 163 163 /* 164 164 * CPU cgroup support flags 165 165 */ 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 */ 167 167 168 168 SCX_OPS_ALL_FLAGS = SCX_OPS_KEEP_BUILTIN_IDLE | 169 169 SCX_OPS_ENQ_LAST | ··· 3896 3896 3897 3897 DEFINE_STATIC_PERCPU_RWSEM(scx_cgroup_rwsem); 3898 3898 static bool scx_cgroup_enabled; 3899 - static bool cgroup_warned_missing_weight; 3900 - static bool cgroup_warned_missing_idle; 3901 - 3902 - static void scx_cgroup_warn_missing_weight(struct task_group *tg) 3903 - { 3904 - if (scx_enable_state() == SCX_DISABLED || cgroup_warned_missing_weight) 3905 - return; 3906 - 3907 - if ((scx_ops.flags & SCX_OPS_HAS_CGROUP_WEIGHT) || !tg->css.parent) 3908 - return; 3909 - 3910 - pr_warn("sched_ext: \"%s\" does not implement cgroup cpu.weight\n", 3911 - scx_ops.name); 3912 - cgroup_warned_missing_weight = true; 3913 - } 3914 - 3915 - static void scx_cgroup_warn_missing_idle(struct task_group *tg) 3916 - { 3917 - if (!scx_cgroup_enabled || cgroup_warned_missing_idle) 3918 - return; 3919 - 3920 - if (!tg->idle) 3921 - return; 3922 - 3923 - pr_warn("sched_ext: \"%s\" does not implement cgroup cpu.idle\n", 3924 - scx_ops.name); 3925 - cgroup_warned_missing_idle = true; 3926 - } 3927 3899 3928 3900 int scx_tg_online(struct task_group *tg) 3929 3901 { ··· 3904 3932 WARN_ON_ONCE(tg->scx_flags & (SCX_TG_ONLINE | SCX_TG_INITED)); 3905 3933 3906 3934 percpu_down_read(&scx_cgroup_rwsem); 3907 - 3908 - scx_cgroup_warn_missing_weight(tg); 3909 3935 3910 3936 if (scx_cgroup_enabled) { 3911 3937 if (SCX_HAS_OP(cgroup_init)) { ··· 4042 4072 4043 4073 void scx_group_set_idle(struct task_group *tg, bool idle) 4044 4074 { 4045 - percpu_down_read(&scx_cgroup_rwsem); 4046 - scx_cgroup_warn_missing_idle(tg); 4047 - percpu_up_read(&scx_cgroup_rwsem); 4075 + /* TODO: Implement ops->cgroup_set_idle() */ 4048 4076 } 4049 4077 4050 4078 static void scx_cgroup_lock(void) ··· 4236 4268 4237 4269 percpu_rwsem_assert_held(&scx_cgroup_rwsem); 4238 4270 4239 - cgroup_warned_missing_weight = false; 4240 - cgroup_warned_missing_idle = false; 4241 - 4242 4271 /* 4243 4272 * scx_tg_on/offline() are excluded through scx_cgroup_rwsem. If we walk 4244 4273 * cgroups and init, all online cgroups are initialized. ··· 4244 4279 css_for_each_descendant_pre(css, &root_task_group.css) { 4245 4280 struct task_group *tg = css_tg(css); 4246 4281 struct scx_cgroup_init_args args = { .weight = tg->scx_weight }; 4247 - 4248 - scx_cgroup_warn_missing_weight(tg); 4249 - scx_cgroup_warn_missing_idle(tg); 4250 4282 4251 4283 if ((tg->scx_flags & 4252 4284 (SCX_TG_ONLINE | SCX_TG_INITED)) != SCX_TG_ONLINE) ··· 4577 4615 4578 4616 static void free_exit_info(struct scx_exit_info *ei) 4579 4617 { 4580 - kfree(ei->dump); 4618 + kvfree(ei->dump); 4581 4619 kfree(ei->msg); 4582 4620 kfree(ei->bt); 4583 4621 kfree(ei); ··· 4593 4631 4594 4632 ei->bt = kcalloc(SCX_EXIT_BT_LEN, sizeof(ei->bt[0]), GFP_KERNEL); 4595 4633 ei->msg = kzalloc(SCX_EXIT_MSG_LEN, GFP_KERNEL); 4596 - ei->dump = kzalloc(exit_dump_len, GFP_KERNEL); 4634 + ei->dump = kvzalloc(exit_dump_len, GFP_KERNEL); 4597 4635 4598 4636 if (!ei->bt || !ei->msg || !ei->dump) { 4599 4637 free_exit_info(ei); ··· 5202 5240 scx_error("SCX_OPS_BUILTIN_IDLE_PER_NODE requires CPU idle selection enabled"); 5203 5241 return -EINVAL; 5204 5242 } 5243 + 5244 + if (ops->flags & SCX_OPS_HAS_CGROUP_WEIGHT) 5245 + pr_warn("SCX_OPS_HAS_CGROUP_WEIGHT is deprecated and a noop\n"); 5205 5246 5206 5247 return 0; 5207 5248 }
+1 -1
tools/sched_ext/scx_flatcg.bpf.c
··· 950 950 .cgroup_move = (void *)fcg_cgroup_move, 951 951 .init = (void *)fcg_init, 952 952 .exit = (void *)fcg_exit, 953 - .flags = SCX_OPS_HAS_CGROUP_WEIGHT | SCX_OPS_ENQ_EXITING, 953 + .flags = SCX_OPS_ENQ_EXITING, 954 954 .name = "flatcg");