[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bce694fc-432c-846b-bd96-592368d12e20@arm.com>
Date: Wed, 17 Nov 2021 10:12:34 +0000
From: Lukasz Luba <lukasz.luba@....com>
To: Thara Gopinath <thara.gopinath@...aro.org>
Cc: sudeep.holla@....com, gregkh@...uxfoundation.org,
rafael@...nel.org, bjorn.andersson@...aro.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] base: arch_topology: Use policy->max to calculate
freq_factor
On 11/15/21 8:10 PM, Thara Gopinath 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.
>
> 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();
>
LGTM
Reviewed-by: Lukasz Luba <lukasz.luba@...c.com>
Powered by blists - more mailing lists