From: Juri Lelli <juri.lelli@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, peterz@infradead.org,
vincent.guittot@linaro.org, robh+dt@kernel.org,
mark.rutland@arm.com, linux@arm.linux.org.uk,
sudeep.holla@arm.com, lorenzo.pieralisi@arm.com,
catalin.marinas@arm.com, will.deacon@arm.com,
morten.rasmussen@arm.com, dietmar.eggemann@arm.com,
juri.lelli@arm.com, broonie@kernel.org, sgurrappadi@nvidia.com
Subject: [PATCH v5 0/8] CPUs capacity information for heterogeneous systems
Date: Wed, 15 Jun 2016 11:17:49 +0100 [thread overview]
Message-ID: <1465985877-18271-1-git-send-email-juri.lelli@arm.com> (raw)
Hi all,
this is take 5 of "CPUs capacity information for heterogeneous systems"
patchset [1] (please refer to previous postings to get some context). Apologies
for taking so much time before posting a new version, I've been busy working on
other (related :-)) stuff.
Anyway, after v4 review we seem to still agree that a new DT binding is
reasonable (as it is only a first-order approximation that it is useful to get
acceptable good behaviours during boot and early execution and it can be then
overwritten using the sysfs interface if needed). However, Rob asked for more
precision in defining the binding and Mark, Sai and Vincent seem to agree that
we should extract the frequency component from the values we put in DT.
In this new version I made several changes:
- first patch of v4 is now mainline (but we've got a new one, see below)
- clearly state that Dhrystone is used to get this first order approx values
- the binding is now called capacity-dmips-mhz (suggestions for better naming
are welcome!)
- capacity-dmips-mhz have to be calculated by:
+ running dhrystone at max freq on each cpu (in practice it can be run just
on the first cpu of each cluster and at any frequency)
+ collect DMIPS/MHz by dividing the score by the frequency at which it has
been run
+ normalize DMIPS/MHz and put such values in the DT (we've got a new patch
in the series for JUNO R2)
- at boot we use a cpufreq callback to be able to multiply back capacity-dmips
-mhz for policy->max and then normalize w.r.t. 1024
- if cpufreq is not in the mix, we use capacity-dmips-mhz values as they are
(since we don't know at which frequency we are running at, we assume that
CPUs run all at the same frequency)
I guess at least some more comments in the code and some more lines in
Documentation will help, but I'll defer that to v6: I'd like to see if we can
first reach an agreement.
Patches high level description:
o 01/08 introduces documentation for the new optional DT binding
o [02-06]/08 add cpu-capacity attribute to TC2, Juno and Juno r2 DTs and
provide parsing of such information at boot time
o [07-08]/08 introduce sysfs attribute
The patchset is based on top of mainline as of today (4.7-rc3).
In case you would like to test this out, I pushed a branch here:
git://linux-arm.org/linux-jl.git upstream/default_caps_v5
This branch contains additional patches, useful to better understand how CPU
capacity information is actually used by the scheduler. However, discussion
regarding these additional patches is outside the scope of this posting.
Best,
- Juri
Juri Lelli (8):
Documentation: arm: define DT cpu capacity-dmips-mhz bindings
arm: parse cpu capacity-dmips-mhz from DT
arm, dts: add TC2 cpu capacity-dmips-mhz information
arm64: parse cpu capacity-dmips-mhz from DT
arm64, dts: add Juno cpu capacity-dmips-mhz information
arm64, dts: add Juno r2 cpu capacity-dmips-mhz information
arm: add sysfs cpu_capacity attribute
arm64: add sysfs cpu_capacity attribute
.../devicetree/bindings/arm/cpu-capacity.txt | 236 +++++++++++++++++++++
Documentation/devicetree/bindings/arm/cpus.txt | 10 +
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 5 +
arch/arm/kernel/topology.c | 213 ++++++++++++++++++-
arch/arm64/boot/dts/arm/juno-r2.dts | 6 +
arch/arm64/boot/dts/arm/juno.dts | 6 +
arch/arm64/kernel/topology.c | 213 +++++++++++++++++++
7 files changed, 688 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/arm/cpu-capacity.txt
--
2.7.0
next reply other threads:[~2016-06-15 10:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 10:17 Juri Lelli [this message]
2016-06-15 10:17 ` [PATCH v5 1/8] Documentation: arm: define DT cpu capacity-dmips-mhz bindings Juri Lelli
2016-06-15 12:51 ` Vincent Guittot
2016-06-15 14:24 ` Juri Lelli
2016-06-15 14:04 ` Mark Brown
2016-06-15 14:22 ` Juri Lelli
2016-06-15 22:11 ` Rob Herring
2016-06-16 8:20 ` Juri Lelli
2016-06-22 16:51 ` Juri Lelli
2016-06-15 10:17 ` [PATCH v5 2/8] arm: parse cpu capacity-dmips-mhz from DT Juri Lelli
2016-06-15 10:17 ` [PATCH v5 3/8] arm, dts: add TC2 cpu capacity-dmips-mhz information Juri Lelli
2016-06-15 10:17 ` [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT Juri Lelli
[not found] ` <CADRr18P=EOwpZTc-aS=4cCa8B3ObpuqpbNNv+w5Q4shXD6s7HQ@mail.gmail.com>
2016-06-15 10:25 ` Juri Lelli
2016-06-15 13:49 ` Mark Brown
2016-06-15 14:48 ` Juri Lelli
2016-06-15 10:17 ` [PATCH v5 5/8] arm64, dts: add Juno cpu capacity-dmips-mhz information Juri Lelli
2016-06-15 10:17 ` [PATCH v5 6/8] arm64, dts: add Juno r2 " Juri Lelli
2016-06-15 10:17 ` [PATCH v5 7/8] arm: add sysfs cpu_capacity attribute Juri Lelli
2016-06-15 10:17 ` [PATCH v5 8/8] arm64: " Juri Lelli
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=1465985877-18271-1-git-send-email-juri.lelli@arm.com \
--to=juri.lelli@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=robh+dt@kernel.org \
--cc=sgurrappadi@nvidia.com \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=will.deacon@arm.com \
/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).