Re: [RFC PATCH v1 2/8] sched/proxy: Wake blocked RT and deadline tasks through the full path

From: John Stultz

Date: Mon Nov 16 2026 - 16:36:13 EST


On Mon, Nov 16, 2026 at 11:26 AM Mathieu Desnoyers
<mathieu.desnoyers@xxxxxxxxxxxx> wrote:
>
> With proxy execution, a task blocked on a mutex stays on its runqueue.
> The RT and deadline classes do not put such a task on their pushable
> lists. enqueue_task_rt() and put_prev_task_rt() skip a blocked task.
> enqueue_task_dl() and put_prev_task_dl() do the same. find_proxy_task()
> migrates it instead.
>
> Commit 7918cf369361 ("sched/proxy: Only return migrate when needed")
> wakes a blocked task in place when it is still on its original CPU.
> That wake-up does no enqueue. It also skips select_task_rq() and the
> task_woken() method of the class. So the woken task is runnable, but it
> is not pushable, and no other CPU can pull it.
>
> A SCHED_FIFO task woken this way waits behind a higher priority task
> while another CPU is idle. In a test on two CPUs, it ran 500ms after
> the mutex was released, when the higher priority task stopped. Without
> proxy execution it ran at once on the idle CPU. The test uses
> SCHED_FIFO. The deadline class has the same code path.
>
> Fix this in proxy_needs_return(). An RT or deadline task takes the full
> wake-up path, as a task that was proxy-migrated does. The other classes
> keep the in-place wake-up.
>
> Fixes: 7918cf369361 ("sched/proxy: Only return migrate when needed")
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>

I need to look more closely here but this seems likely to overlap with
currently out-of-tree chain-migration patches that Conor came up with:
https://github.com/johnstultz-work/linux-dev/commit/80b820a921bf5058196314ab72f8446f5ca3bad6
https://github.com/johnstultz-work/linux-dev/commit/27f701c997a152cc831262b55a226d513fa6abab
https://github.com/johnstultz-work/linux-dev/commit/fd1c4d9c6df6183e5ad934851dbbaa31846619e1
https://github.com/johnstultz-work/linux-dev/commit/d0d409fad42196f4f41267593566c0e55f856d6d

(from my https://github.com/johnstultz-work/linux-dev/commits/proxy-exec-v33-7.4-pre-rc1/
branch)

So I'm not totally surprised to hear there's DL/RT balancing issues currently.

Also in another thread (which I can't find right now), a good point
was raised that some of the early return "shortcuts" that I've used
elsewhere aren't good for core-scheduling either since they can break
the cookie checks, so I wonder if a better fix here would be just
removing that (task_cpu(p) == p->wake_cpu) conditional all together?

thanks
-john