Re: [PATCH] sched: Re-evaluate scheduling when migrating queued tasks out of throttled cgroups
From: K Prateek Nayak
Date: Mon Jan 19 2026 - 22:34:10 EST
Hello Zicheng,
On 1/19/2026 7:00 PM, Zicheng Qu wrote:
> @@ -9120,12 +9121,16 @@ void sched_move_task(struct task_struct *tsk, bool for_autogroup)
> sched_change_group(tsk);
> if (!for_autogroup)
> scx_cgroup_move_task(tsk);
> + if (scope->queued)
> + queued = true;
nit. This can just be "queued = scope->queued"
Other than that, this fix looks good. Feel free to include:
Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> if (scope->running)
> resched = true;
> }
>
> if (resched)
> resched_curr(rq);
> + else if (queued)
> + wakeup_preempt(rq, tsk, 0);
>
> __balance_callbacks(rq, &rq_guard.rf);
> }
--
Thanks and Regards,
Prateek