Re: [Patch v6 1/7] sched/pelt.c: Add support to track thermal pressure

From: Dietmar Eggemann
Date: Tue Dec 17 2019 - 07:54:23 EST


On 12/12/2019 05:11, Thara Gopinath wrote:

minor: in subject: s/sched/pelt.c/sched/pelt

[...]

> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
> index a96db50..9aac3b7 100644
> --- a/kernel/sched/pelt.c
> +++ b/kernel/sched/pelt.c
> @@ -353,6 +353,28 @@ int update_dl_rq_load_avg(u64 now, struct rq *rq, int running)
> return 0;
> }
>
> +/*
> + * thermal:
> + *
> + * load_sum = \Sum se->avg.load_sum

Why not '\Sum rq->avg.load_sum' ?

> + *
> + * util_avg and runnable_load_avg are not supported and meaningless.
> + *
> + */
> +int update_thermal_load_avg(u64 now, struct rq *rq, u64 capacity)
> +{
> + if (___update_load_sum(now, &rq->avg_thermal,
> + capacity,
> + capacity,
> + capacity)) {
> + ___update_load_avg(&rq->avg_thermal, 1, 1);
> + trace_pelt_thermal_tp(rq);
> + return 1;
> + }
> +
> + return 0;
> +}
> +

[...]