Re: [PATCH v2 3/3] sched/fair: update rq->avg_idle for the delay-dequeue task

From: K Prateek Nayak

Date: Thu Nov 27 2025 - 00:51:28 EST


On 11/27/2025 10:33 AM, Huang Shijie wrote:
> When a delay-dequeue task is woken and requeued back, it may
> becomes eligible, and changes the CPU idle status,
> so we need to update the rq->avg_idle for it.
>
> This patch adds a new parameter for requeue_delayed_entity(),
> and updates the rq->avg_idle as needed.

Can't this be solved by moving update_rq_avg_idle() into
enqueue_task() in the previous patch? The only path that can
reenqueue a delayed task from ttwu_runnable() calls
enqueue_task() with ENQUEUE_DELAYED.

--
Thanks and Regards,
Prateek