linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	catalin.marinas@arm.com, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example
Date: Thu, 25 Oct 2018 14:04:12 +0200	[thread overview]
Message-ID: <80206cb7-b550-1cf6-abf4-e4b17de4cdb5@linaro.org> (raw)
In-Reply-To: <138600f5d504b41202a29a1e130a7aa4e51f1925.1540451976.git.viresh.kumar@linaro.org>

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


  reply	other threads:[~2018-10-25 12:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25  8:27 [PATCH] dt-bindings: arm: Fix cpu capacity mismatch in example Viresh Kumar
2018-10-25 12:04 ` Daniel Lezcano [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80206cb7-b550-1cf6-abf4-e4b17de4cdb5@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).