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

From: Vincent Guittot

Date: Thu Jul 02 2026 - 03:56:15 EST


On Thu, 2 Jul 2026 at 09:43, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> 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.

Maybe better in tip/sched/urgent because of the warn triggered in set_next_buddy