Re: [PATCH] [RFC]: sched/deadline: Avoid double enqueue_pushable_dl_task() warning

From: Juri Lelli

Date: Wed Mar 04 2026 - 02:08:17 EST


Hello,

On 03/03/26 19:41, John Stultz wrote:
> In testing with the full Proxy Execution patch stack, I found
> I would occasionally trip over the !RB_EMPTY_NODE() WARN_ON in
> enqueue_pushable_dl_task(), where the task we're adding to the
> pushable list is already enqueued.
>
> This triggers from put_prev_task_dl(), where it seems we go into
> put_prev_task_dl()
> -> update_curr_dl()
> -> update_curr_dl_se() [hitting the dl_runtime_exceeded() case]
> -> enqueue_task_dl()
> -> enqueue_pushable_dl_task()
>
> Adding the task to the pushable the first time.

Ah, so in case the task is boosted (or we fail to start the
replenishment timer).

> Then we back up the call stack to put_prev_task_dl(), which at
> the end again calls enqueue_pushable_dl_task(), trying to add it
> a second time, tripping the warning.
>
> To avoid this, add a dl_task_pushable() helper which we can use
> to replace the RB_EMPTY_NODE checks elsewhere, and then before
> enqueueing in put_prev_task_dl(), we can first check
> dl_task_pushable() to avoid the double enqueue.

Can't we just return early (as we do already in dequeue_pushable
_dl_task()) in enqueue_pushable_dl_task() instead of checking before
calling that function?

Thanks,
Juri