Re: [PATCH v6 2/2] sched: update the rq->avg_idle when a task is moved to an idle CPU
From: Shijie Huang
Date: Thu Dec 11 2025 - 22:16:33 EST
On 12/12/2025 00:15, Dietmar Eggemann wrote:
In v2 you moved update_rq_avg_idle() (1) from activate_task() (2) toNot for the delayed tasks, just for a more common place to handle more cases.
enqueue_task() to possibly handle delayed tasks.
In v3 you figured there can't be any delayed task on a CPU when it setsYes.
rq->idle_stamp in sched_balance_newidle()
So you could move (1) back to (2) avoiding the 'if rq->idle_stamp' forCould you please tell me what is "avoiding the 'if rq->idle_stamp' for the sched_change pattern" ?
the sched_change pattern for instance?
Sorry, I do not understand your meaning.
IMHO, there is no need to move (1) back to (2).
Thanks
Huang Shijie