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:   Wed, 6 Nov 2019 12:00:00 -0500
From:   Thara Gopinath <thara.gopinath@...aro.org>
To:     Dietmar Eggemann <dietmar.eggemann@....com>, mingo@...hat.com,
        peterz@...radead.org, ionela.voinescu@....com,
        vincent.guittot@...aro.org, rui.zhang@...el.com,
        edubezval@...il.com, qperret@...gle.com
Cc:     linux-kernel@...r.kernel.org, amit.kachhap@...il.com,
        javi.merino@...nel.org, daniel.lezcano@...aro.org
Subject: Re: [Patch v5 1/6] sched/pelt.c: Add support to track thermal
 pressure

Hi Dietmar,
Thanks for the review.
On 11/06/2019 07:50 AM, Dietmar Eggemann wrote:
> On 05/11/2019 19:49, Thara Gopinath wrote:
>> Extrapolating on the exisiting framework to track rt/dl utilization using
> 
> s/exisiting/existing
> 
>> pelt signals, add a similar mechanism to track thermal pressure. The
>> difference here from rt/dl utilization tracking is that, instead of
>> tracking time spent by a cpu running a rt/dl task through util_avg,
>> the average thermal pressure is tracked through load_avg. This is
>> because thermal pressure signal is weighted "delta" capacity
>> and is not binary(util_avg is binary). "delta capacity" here
>> means delta between the actual capacity of a cpu and the decreased
>> capacity a cpu due to a thermal event.
>> In order to track average thermal pressure, a new sched_avg variable
>> avg_thermal is introduced. Function update_thermal_load_avg can be called
>> to do the periodic bookeeping (accumulate, decay and average)
> 
> s/bookeeping/bookkeeping
> 
>> of the thermal pressure.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@...aro.org>
>> ---
>>  kernel/sched/pelt.c  | 13 +++++++++++++
>>  kernel/sched/pelt.h  |  7 +++++++
>>  kernel/sched/sched.h |  1 +
>>  3 files changed, 21 insertions(+)
>>
>> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
>> index a96db50..3821069 100644
>> --- a/kernel/sched/pelt.c
>> +++ b/kernel/sched/pelt.c
>> @@ -353,6 +353,19 @@ int update_dl_rq_load_avg(u64 now, struct rq *rq, int running)
>>  	return 0;
>>  }
> 
> Minor thing: There are function headers for rt_rq, dl_rq and irq. rt_rq
> even explains that 'load_avg and runnable_load_avg are not supported and
> meaningless.' Could you do something similar for thermal here? It's not
> self-explanatory why we track load_avg, runnable_load_avg and util_avg
> for thermal but only use load_avg.

Will put a function header and update the nits above.
> 
>> +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);
>> +		return 1;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
> 
> [...]
> 


-- 
Warm Regards
Thara

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ