Re: [PATCH 01/12] sched/core: Avoid false migration warning for proxy donors

From: John Stultz

Date: Tue Jul 21 2026 - 03:07:48 EST


On Mon, Jul 20, 2026 at 11:33 PM Andrea Righi <arighi@xxxxxxxxxx> wrote:
>
> Proxy execution can move a blocked donor's scheduling context to the
> lock owner's CPU even when the donor is migration-disabled. The donor
> does not execute there, and its original execution CPU remains recorded
> in wake_cpu.
>
> set_task_cpu() warns unconditionally for migration-disabled tasks, so a
> subsequent proxy migration or the wakeup path returning the donor home
> triggers a false positive. Moving a blocked scheduling context does not
> violate the migration-disabled execution context.
>
> Exclude blocked proxy donors from the warning. The proxy wakeup path
> restores an executable placement before clearing the blocked state.
>
> This is a preparatory fix for enabling proxy execution together with
> sched_ext.
>
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>

Nice catch on this!

I'm wondering why I've not tripped this myself yet. Is
migration_disabled set more often in the sched_ext paths? Or was there
a specific workload that you hit this with?

Acked-by: John Stultz <jstultz@xxxxxxxxxx>

thanks
-john