Re: [PATCH 03/12] sched: Add helper to block retained proxy donors
From: John Stultz
Date: Tue Jul 21 2026 - 03:08:03 EST
On Mon, Jul 20, 2026 at 11:33 PM Andrea Righi <arighi@xxxxxxxxxx> wrote:
>
> Scheduler ownership changes may need to turn a mutex-blocked task
> retained on the runqueue for proxy execution back into a normally
> blocked task.
>
> Add sched_proxy_block_task() to perform that transition while holding
> p->pi_lock and the task's runqueue lock. Reset an active donor to the
> physical current task before blocking it. If DELAY_DEQUEUE keeps a FAIR
> donor queued, the immediately following sched_change_begin() completes
> the dequeue through switching_from_fair() before recording its queued
> state.
>
> This is a preparatory change to support proxy execution with sched_ext.
>
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
Acked-by: John Stultz <jstultz@xxxxxxxxxx>