Re: [PATCH v34 03/14] sched/proxy: Reschedule when a blocked task is woken under a proxy

From: K Prateek Nayak

Date: Wed Dec 02 2026 - 00:07:00 EST


On 12/2/2026 10:30 AM, K Prateek Nayak wrote:
> We can perhaps re-arrange the checks in proxy_needs_return() as:
>
> if (task_current(rq, p)) /* implies p->on_cpu && task_cpu(p) == p->wake_cpu */
> return false;
>
> if (task_current_donor(rq, p)
> proxy_reset_donor(rq)
>
> if (task_cpu(p) == p->wake_cpu && !rt_dl_task(p))
> return false;
>
> /* Do the dequeue; Don't touch p->blocked_on. */

So the enqueue_task_rt() and enqueue_task_dl() do actually look
at p->blocked_on to queue that balance callback so I guess that
clearing is needed after all.

But the re-ordering should be still fine - if task_current() is
true we still haven't lost to schedule and the task is still
queued on the original rq.

--
Thanks and Regards,
Prateek