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

From: John Stultz

Date: Wed Dec 02 2026 - 00:47:52 EST


On Tue, Dec 1, 2026 at 9:00 PM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
> On 12/2/2026 9:22 AM, John Stultz wrote:
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 181d0e70c88d4..9ba25925c928a 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -3981,6 +3981,14 @@ static int ttwu_runnable(struct task_struct *p, int wake_flags)
> > if (p->is_blocked) {
> > if (p->se.sched_delayed)
> > enqueue_task(rq, p, ENQUEUE_NOCLOCK | ENQUEUE_DELAYED);
> > + /*
> > + * If we're waking a blocked task and we are
> > + * currently proxying, force a resched in case
> > + * the woken task p is in the current donor chain
> > + */
> > + if (rq->donor != rq->curr)
> > + resched_curr(rq);
> > +
>
> Principally, I don't have problem with this approach but being able
> to keep all the proxy related handling contained in
> proxy_needs_return() below would be nice :-)

Yeah. Hrmm.. I had the same suggestion to Mathieu when he sent the
patch, and I'm not sure why I didn't do it myself here. I feel like
there was some reconsideration I had but I think I may have just been
doing too many things at once at the time.

I'll go ahead and push it down now and if I recall or re-learn a
reason it shouldn't be there I'll be sure to write it down. :P

thanks
-john