Re: [PATCH 17/17] sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE

From: Tejun Heo

Date: Mon Oct 26 2026 - 17:31:44 EST


Hello, Andrea.

On Sun, Oct 25, 2026 at 04:47:03PM +0100, Andrea Righi wrote:
> Not a blocker, but I was wondering if we should preserve the old head or
> ordinary balancing when the donor still holds BASE?
>
> If a selected donee refuses a task homed on the donor, this can put it
> at the tail of the same DSQ. A proxy-migrated blocked donor is refused
> by remote CPUs, so repeated balancing passes could keep pushing it back.

Yeah, the reenqueue at home pushes such a task to the back of its own DSQ
on every pass. Rather than restoring the head put-back, v4 has the walk
skip the task from the start. A balancing donor tests whether the task
can move to the picked donee and leaves it where it is if it can't, as it
already does for a task with no donee. The test is factored into
bypass_lb_can_move(), shared with bypass_lb_move(). A drain still sends
the task home.

If something changes while the move is in flight, the task is still
reenqueued at home and appended to the tail. That's rare enough and not
systemic, so it isn't a problem.

Thanks.

--
tejun