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]
Message-ID: <16542a14-9023-5164-62de-fe999d89a350@arm.com>
Date:   Wed, 17 Nov 2021 12:21:13 +0100
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Thara Gopinath <thara.gopinath@...aro.org>
Cc:     Sudeep Holla <sudeep.holla@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH] base: arch_topology: Use policy->max to calculate
 freq_factor

On 16.11.21 20:05, Rafael J. Wysocki wrote:
> On Mon, Nov 15, 2021 at 9:10 PM Thara Gopinath
> <thara.gopinath@...aro.org> wrote:
>>
>> cpuinfo.max_freq can reflect boost frequency if enabled during boot.  Since
>> we don't consider boost frequencies while calculating cpu capacities, use
>> policy->max to populate the freq_factor during boot up.
> 
> I'm not sure about this.  schedutil uses cpuinfo.max_freq as the max frequency.

Same question here. There is this:

  capacity = (freq / freq_max) * arch_scale_cpu_capacity()

in cpufreq_set_cur_state() [drivers/thermal/cpufreq_cooling.c]

where freq_max is `cpufreq_cdev->policy->cpuinfo.max_freq`

And this is then used to calc the PELT thermal pressure.

> 
>> Signed-off-by: Thara Gopinath <thara.gopinath@...aro.org>
>> ---
>>  drivers/base/arch_topology.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
>> index 43407665918f..df818b439bc3 100644
>> --- a/drivers/base/arch_topology.c
>> +++ b/drivers/base/arch_topology.c
>> @@ -334,7 +334,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
>>         cpumask_andnot(cpus_to_visit, cpus_to_visit, policy->related_cpus);
>>
>>         for_each_cpu(cpu, policy->related_cpus)
>> -               per_cpu(freq_factor, cpu) = policy->cpuinfo.max_freq / 1000;
>> +               per_cpu(freq_factor, cpu) = policy->max / 1000;
>>
>>         if (cpumask_empty(cpus_to_visit)) {
>>                 topology_normalize_cpu_scale();
>> --
>> 2.25.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ