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

From: Tejun Heo

Date: Mon Aug 10 2026 - 18:10:45 EST


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.

Thanks.

--
tejun