sched_ext: Fixes for v7.1-rc6

Two low-risk fixes:
 
 - Drop a spurious warning that can fire during cgroup migration while a
   sched_ext scheduler is loaded.
 
 - Fix a drgn-based debug script that broke after scheduler state moved into
   a per-scheduler struct.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCah9Z2A4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGT1zAQCjQeWMm3ULnezjh6Oqx7KhPAdq20Gfzx6/hwjM
 Lq1xHAD7B1aiUrMc6Hg405EI6vP9lScjxF6TyvEqmtfL0EmA0ww=
 =mZNl
 -----END PGP SIGNATURE-----

Merge tag 'sched_ext-for-7.1-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext

Pull sched_ext fixes from Tejun Heo:
 "Two low-risk fixes:

   - Drop a spurious warning that can fire during cgroup migration while
     a sched_ext scheduler is loaded

   - Fix a drgn-based debug script that broke after scheduler state
     moved into a per-scheduler struct"

* tag 'sched_ext-for-7.1-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
  sched_ext: Don't warn on NULL cgrp_moving_from in scx_cgroup_move_task()
  tools/sched_ext: Fix scx_show_state per-scheduler state reads
This commit is contained in:
Linus Torvalds 2026-06-03 08:52:26 -07:00
commit ac5c3716c6
2 changed files with 19 additions and 10 deletions

View file

@ -4402,11 +4402,13 @@ void scx_cgroup_move_task(struct task_struct *p)
return;
/*
* @p must have ops.cgroup_prep_move() called on it and thus
* cgrp_moving_from set.
* scx_cgroup_can_attach() sets cgrp_moving_from only when the task's
* cgroup changes. Migration keys off css rather than cgroup identity,
* so it can hand an unchanged-cgroup task here with cgrp_moving_from
* NULL. Nothing to report to the BPF scheduler then, so skip it and
* keep prep_move and move paired.
*/
if (SCX_HAS_OP(sch, cgroup_move) &&
!WARN_ON_ONCE(!p->scx.cgrp_moving_from))
if (SCX_HAS_OP(sch, cgroup_move) && p->scx.cgrp_moving_from)
SCX_CALL_OP_TASK(sch, cgroup_move, task_rq(p),
p, p->scx.cgrp_moving_from,
tg_cgrp(task_group(p)));