Re: [RFC PATCH 0/3] sched/core: Allow proxy execution to work with core scheduling

From: John Stultz

Date: Sat Jul 18 2026 - 03:02:07 EST


On Fri, Jul 17, 2026 at 4:16 AM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
>
> Proxy execution runs the lock owner in place of blocked donor returned
> by pick_next_task() but the lock owner can have a different core-cookie
> compared to the blocked donor and simply running the lock owner under
> those circumstances breaks the guarantees of core scheduling.
>
> Allow proxy execution to exist alognside core scheduling by forcing a
> re-pick once the blocked_on chain is found to be stable in __schedule()
> and then swapping the rq->core_pick with the lock owner allowing the
> execution context to dictate the core-cookie.
>
> Lightly tested with John's priority-inversion-demo [1] patched with
> "coresched new -t pid --" and the plotted chart seems to suggest proxy
> is working [2]. Your mileage may vary :-)
>
> I'll update the thread if I find any nasty bugs over the weekend run.
> Patches are prepared on top of:
>
> https://github.com/johnstultz-work/linux-dev.git proxy-exec-v30-7.2-rc1
>
> at commit abb09adc985b ("HACK: scx: Add scx_prio_inversion test
> scheduler") with commit 93bd6418a6ea ("sched/core: Skip
> put_prev_task/set_next_task re-entry for sched_ext donors") reverted on
> top to make !EXT builds happy.
>
> This is essentially a formal version of [3] broken down to be slightly
> more readable. Comments and feedback are always appreciated!

This is very cool! Thank you so much for sending this out!

I unfortunately didn't get a chance to queue it up in my tree for
testing today, but I'm eager to do so monday!

Hopefully I can get my tree cleaned up and get v31 sent out, as
there's been a number of issues fixed since v30. And between you,
Andrea and Suleiman, there's a lot of cool new functionality to
include in the full series!

thanks
-john