lkml.org 
[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [Patch v9 5/8] sched/fair: update cpu_capacity to reflect thermal pressure
On Wed, Jan 29, 2020 at 4:06 AM Thara Gopinath
<thara.gopinath@linaro.org> wrote:
>
> cpu_capacity initially reflects the maximum possible capacity of a cpu.
> Thermal pressure on a cpu means this maximum possible capacity is
> unavailable due to thermal events. This patch subtracts the average thermal
> pressure for a cpu from its maximum possible capacity so that cpu_capacity
> reflects the actual maximum currently available capacity.

"actual maximum currently available capacity" is quite a mouthful. :-)

"Remaining capacity" or "Effective capacity" anyone?

IIUC, this remaining capacity is NOT the same as the capped/decreased
capacity referred to in patches 1 and 3. The delta capacity (aka
thermal pressure) there refers to the difference between HW max
capacity and thermally throttled capacity.
Here, we also subtract RT/DL utilisation. Is that accurate?




>
> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
> ---
>
> v8->v9:
> - Use thermal_load_avg to read rq->avg_thermal.load_avg.
>
> kernel/sched/fair.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 5f58c03..d879077 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7753,8 +7753,15 @@ static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu)
> if (unlikely(irq >= max))
> return 1;
>
> + /*
> + * avg_rt.util avg and avg_dl.util track binary signals
> + * (running and not running) with weights 0 and 1024 respectively.
> + * avg_thermal.load_avg tracks thermal pressure and the weighted
> + * average uses the actual delta max capacity(load).
> + */
> used = READ_ONCE(rq->avg_rt.util_avg);
> used += READ_ONCE(rq->avg_dl.util_avg);
> + used += thermal_load_avg(rq);
>
> if (unlikely(used >= max))
> return 1;
> --
> 2.1.4
>

\
 
 \ /
  Last update: 2020-02-13 14:40    [W:0.114 / U:19.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site