lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Feb 2020 09:12:12 -0500
From:   Thara Gopinath <thara.gopinath@...aro.org>
To:     Amit Kucheria <amit.kucheria@...durent.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>, ionela.voinescu@....com,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Zhang Rui <rui.zhang@...el.com>, qperret@...gle.com,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Sudeep Holla <sudeep.holla@....com>,
        Juri Lelli <juri.lelli@...hat.com>, corbet@....net,
        LKML <linux-kernel@...r.kernel.org>,
        Amit Daniel Kachhap <amit.kachhap@...il.com>,
        Javi Merino <javi.merino@...nel.org>
Subject: Re: [Patch v9 5/8] sched/fair: update cpu_capacity to reflect thermal
 pressure

On 02/13/2020 07:47 AM, Amit Kucheria wrote:
> On Wed, Jan 29, 2020 at 4:06 AM Thara Gopinath
> <thara.gopinath@...aro.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.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@...aro.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
> 
> For avg_rt, s/util avg/util_avg/
> For avg_dl, s/util/util_avg/    ?

Yep. Will fix it.

> 
>> +        * (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
>>


-- 
Warm Regards
Thara

Powered by blists - more mailing lists