Re: [PATCH 2/6] sched/core: Make core-sched flips wait for in-flight selections

From: Peter Zijlstra

Date: Tue Aug 11 2026 - 12:18:52 EST


On Mon, Aug 10, 2026 at 12:10:20PM -1000, Tejun Heo wrote:
> Hello, Peter.
>
> On Mon, Aug 10, 2026 at 01:15:46PM +0200, Peter Zijlstra wrote:
> > I'm not entirely sure this is the right commit. I suspect this was a
> > problem right from the beginning. This pick_next_task() always had a
> > prev_balance() call that could drop the locks IIRC.
>
> You're right. The balance calls could drop the shared lock mid-selection
> since 539f65125d20 ("sched: Add core wide task selection and scheduling"),
> so stable should target v5.14+. The sched_ext fold only made the window a
> lot more frequent.
>
> How would you like the two sched/core patches routed? I can take the whole
> set through sched_ext/for-7.2-fixes, or hold the sched_ext side until the
> first two come through tip.

You can take them. I just double checked and I don't have anything that
will conflict.

Thanks!