Re: [PATCH] sched/eevdf: Delayed dequeue task can't preempt

From: Peter Zijlstra

Date: Thu Jul 02 2026 - 03:48:08 EST


On Wed, Jul 01, 2026 at 06:49:20PM +0200, Vincent Guittot wrote:
> Load balancing can migrate delayed dequeue tasks to even the load between
> CPUs.
>
> sched_balance_rq()
> -> detach_task()
> -> deactivate_task(DEQUEUE_NOCLOCK)
> -> set_task_cpu(dst_cpu)
>
> -> attach_task()
> -> activate_task(ENQUEUE_NOCLOCK)
> -> wakeup_preempt()
>
> A delayed task with shorter slice can be dequeued during pick_next_entity()
> but then jump to preempt because eligible.

Cute.

Perhaps we can look at enqueue()'s place entity and determine
eligibility there and complete the delayed dequeue there. But that's
definitely something for after the holidays I suppose.

I'll go stick it in tip/sched/core.