* [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
@ 2018-10-25 8:27 Viresh Kumar
2018-10-25 12:04 ` Daniel Lezcano
0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2018-10-25 8:27 UTC (permalink / raw)
To: catalin.marinas, Rob Herring, Mark Rutland
Cc: Viresh Kumar, linux-arm-kernel, Vincent Guittot, Daniel Lezcano,
devicetree, linux-kernel
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@linaro.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@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 578 for cluster1
cpus {
#address-cells = <2>;
--
2.19.1.568.g152ad8e3369a
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
2018-10-25 8:27 [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example Viresh Kumar
@ 2018-10-25 12:04 ` Daniel Lezcano
2018-10-26 4:11 ` Viresh Kumar
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2018-10-25 12:04 UTC (permalink / raw)
To: Viresh Kumar, catalin.marinas, Rob Herring, Mark Rutland
Cc: linux-arm-kernel, Vincent Guittot, devicetree, linux-kernel
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@linaro.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@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 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
2018-10-25 12:04 ` Daniel Lezcano
@ 2018-10-26 4:11 ` Viresh Kumar
2018-10-26 8:30 ` Daniel Lezcano
0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2018-10-26 4:11 UTC (permalink / raw)
To: Daniel Lezcano
Cc: catalin.marinas, Rob Herring, Mark Rutland, linux-arm-kernel,
Vincent Guittot, devicetree, linux-kernel
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
2018-10-26 4:11 ` Viresh Kumar
@ 2018-10-26 8:30 ` Daniel Lezcano
2018-10-29 6:34 ` Viresh Kumar
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2018-10-26 8:30 UTC (permalink / raw)
To: Viresh Kumar
Cc: catalin.marinas, Rob Herring, Mark Rutland, linux-arm-kernel,
Vincent Guittot, devicetree, linux-kernel
On 26/10/2018 06:11, Viresh Kumar wrote:
> 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.
Yes, it will help but if you want to make things even more clear, I
suggest to elaborate the text a bit and give the numbers above to
explain (1100/850=1.294, 446 * 1.294 = 577, ...)
--
<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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
2018-10-26 8:30 ` Daniel Lezcano
@ 2018-10-29 6:34 ` Viresh Kumar
2018-10-29 9:26 ` Daniel Lezcano
0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2018-10-29 6:34 UTC (permalink / raw)
To: Daniel Lezcano
Cc: catalin.marinas, Rob Herring, Mark Rutland, linux-arm-kernel,
Vincent Guittot, devicetree, linux-kernel
On 26-10-18, 10:30, Daniel Lezcano wrote:
> On 26/10/2018 06:11, Viresh Kumar wrote:
> > 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.
>
> Yes, it will help but if you want to make things even more clear, I
> suggest to elaborate the text a bit and give the numbers above to
> explain (1100/850=1.294, 446 * 1.294 = 577, ...)
I didn't wanted to explain way too much, but how about this..
diff --git a/Documentation/devicetree/bindings/arm/cpu-capacity.txt b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
index 9b5685a1d15d..84262cdb8d29 100644
--- a/Documentation/devicetree/bindings/arm/cpu-capacity.txt
+++ b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
@@ -59,9 +59,11 @@ 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
+The capacities-dmips-mhz or DMIPS/MHz values (scaled to 1024)
+are 1024 and 578 for cluster0 and cluster1. Further normalization
+is done by the operating system based on cluster0@max-freq=1100 and
+custer1@max-freq=850, final capacities are 1024 for cluster0 and
+446 for cluster1 (576*850/1100).
cpus {
#address-cells = <2>;
--
viresh
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
2018-10-29 6:34 ` Viresh Kumar
@ 2018-10-29 9:26 ` Daniel Lezcano
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2018-10-29 9:26 UTC (permalink / raw)
To: Viresh Kumar
Cc: catalin.marinas, Rob Herring, Mark Rutland, linux-arm-kernel,
Vincent Guittot, devicetree, linux-kernel
On 29/10/2018 07:34, Viresh Kumar wrote:
> On 26-10-18, 10:30, Daniel Lezcano wrote:
>> On 26/10/2018 06:11, Viresh Kumar wrote:
>>> 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.
>>
>> Yes, it will help but if you want to make things even more clear, I
>> suggest to elaborate the text a bit and give the numbers above to
>> explain (1100/850=1.294, 446 * 1.294 = 577, ...)
>
> I didn't wanted to explain way too much, but how about this..
>
> diff --git a/Documentation/devicetree/bindings/arm/cpu-capacity.txt b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> index 9b5685a1d15d..84262cdb8d29 100644
> --- a/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> +++ b/Documentation/devicetree/bindings/arm/cpu-capacity.txt
> @@ -59,9 +59,11 @@ 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
> +The capacities-dmips-mhz or DMIPS/MHz values (scaled to 1024)
> +are 1024 and 578 for cluster0 and cluster1. Further normalization
> +is done by the operating system based on cluster0@max-freq=1100 and
> +custer1@max-freq=850, final capacities are 1024 for cluster0 and
> +446 for cluster1 (576*850/1100).
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
--
<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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-29 9:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 8:27 [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example Viresh Kumar
2018-10-25 12:04 ` Daniel Lezcano
2018-10-26 4:11 ` Viresh Kumar
2018-10-26 8:30 ` Daniel Lezcano
2018-10-29 6:34 ` Viresh Kumar
2018-10-29 9:26 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).