Re: [PATCH v3] sched: Consolidate cpufreq updates

From: Dietmar Eggemann
Date: Mon May 13 2024 - 08:44:23 EST


On 12/05/2024 21:00, Qais Yousef wrote:

[...]

> @@ -4682,7 +4659,7 @@ static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s
>
> add_tg_cfs_propagate(cfs_rq, se->avg.load_sum);
>
> - cfs_rq_util_change(cfs_rq, 0);
> + cpufreq_update_util(rq_of(cfs_rq), 0);

Isn't this slighlty different now?

before:

if (&rq->cfs == cfs_rq) {
cpufreq_update_util(rq, ....)
}

now:

cpufreq_update_util(rq_of(cfs_rq), ...)

You should get way more updates from attach/detach now.

>
> trace_pelt_cfs_tp(cfs_rq);
> }

[...]