Re: [PATCH v6 2/2] sched: update the rq->avg_idle when a task is moved to an idle CPU
From: Shijie Huang
Date: Tue Dec 16 2025 - 01:37:56 EST
On 13/12/2025 09:36, Vincent Guittot wrote:
put_prev_task_idle() would be a better place to call
update_rq_avg_idle() because this is when we leave idle.
The update_rq_avg_idle() is not only called by current CPU, but also
called by
other CPUs. For example, the try_to_wake_up(), update_rq_avg_idle() is
called by
the other CPUs. So enqueue_task() is a good place.
Thanks
Huang Shijie