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, 25 Oct 2018 14:04:12 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>, catalin.marinas@....com,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>
Cc:     linux-arm-kernel@...ts.infradead.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example

On 25/10/2018 10:27, Viresh Kumar wrote:
> The example text says the capacity value should be 446, while the
> example have it set to 578 instead. Fix the mismatch.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
>  Documentation/devicetree/bindings/arm/cpu-capacity.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/cpu-capacity.txt b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> index 9b5685a1d15d..7a0d6b429c8d 100644
> --- a/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> +++ b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> @@ -61,7 +61,7 @@ mhz values (normalized w.r.t. the highest value found while parsing the DT).
>  Example 1 (ARM 64-bit, 6-cpu system, two clusters):
>  capacities-dmips-mhz are scaled w.r.t. 1024 (cpu@0 and cpu@1)
>  supposing cluster0@...-freq=1100 and custer1@...-freq=850,
> -final capacities are 1024 for cluster0 and 446 for cluster1
> +final capacities are 1024 for cluster0 and 578 for cluster1
>  
>  cpus {
>  	#address-cells = <2>;

I think it is actually correct. The example is confusing on what the
numbers are. IIUC, it is:

(after normalizing)

dhrystone result on big CPU is 1024 at 1100MHz
dhrystone result on little CPU is 446 at 850MHz

We have to scale the result of the little for 1100MHz in order to compare.

1100/850 = 1.294

dhrystone result on little CPU is 446 * 1.294 = 577 at 1100MHz

So we put the normalized values 1024 and 577. The arch_topology will
scale 577 back to 446 as it will compute the max capacity based on the
max freq which is 850MHz.

The *final* capacities are 1024 for cluster0 and 446 for cluster1 (read
the cpu max capacity, the ones showed in the sysfs).

Did I miss something ?


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ