lkml.org 
[lkml]   [2018]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
On 25-10-18, 14:04, Daniel Lezcano wrote:
> 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 ?

No. What about making it more clear in the example to save the next idiot (like
me) from wasting time :)

diff --git a/Documentation/devicetree/bindings/arm/cpu-capacity.txt b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
index 9b5685a1d15d..d061e6575bde 100644
--- a/Documentation/devicetree/bindings/arm/cpu-capacity.txt
+++ b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
@@ -61,7 +61,10 @@ 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@max-freq=1100 and custer1@max-freq=850,
-final capacities are 1024 for cluster0 and 446 for cluster1
+final capacities are 1024 for cluster0 and 446 for cluster1.
+Note that the values mentioned below in the example (1024 and 578)
+aren't normalized based on max frequency of each cluster and that is
+left for the operating system to do.

cpus {
#address-cells = <2>;
--
viresh

\
 
 \ /
  Last update: 2018-10-26 06:12    [W:0.073 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site