From: Morten Rasmussen <morten.rasmussen@arm.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Yuyang Du <yuyang.du@intel.com>,
Dirk Brandewie <dirk.brandewie@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
Dietmar Eggemann <Dietmar.Eggemann@arm.com>,
"len.brown@intel.com" <len.brown@intel.com>,
"jacob.jun.pan@linux.intel.com" <jacob.jun.pan@linux.intel.com>
Subject: Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler
Date: Fri, 6 Jun 2014 15:11:54 +0100 [thread overview]
Message-ID: <20140606141154.GW29593@e103034-lin> (raw)
In-Reply-To: <20140606122740.GA9318@gmail.com>
On Fri, Jun 06, 2014 at 01:27:40PM +0100, Ingo Molnar wrote:
>
> * Ingo Molnar <mingo@kernel.org> wrote:
>
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > > Voltage is combined with frequency, roughly, voltage is
> > > > proportional to freuquecy, so roughly, power is proportionaly to
> > > > voltage^3. You
> > >
> > > P ~ V^2, last time I checked.
> >
> > Yes, that's a good approximation for CMOS gates:
> >
> > The switching power dissipated by a chip using static CMOS gates is
> > C·V^2·f, where C is the capacitance being switched per clock cycle,
> > V is the supply voltage, and f is the switching frequency,[1] so
> > this part of the power consumption decreases quadratically with
> > voltage. The formula is not exact however, as many modern chips are
> > not implemented using 100% CMOS, but also use special memory
> > circuits, dynamic logic such as domino logic, etc. Moreover, there
> > is also a static leakage current, which has become more and more
> > accentuated as feature sizes have become smaller (below 90
> > nanometres) and threshold levels lower.
> >
> > Accordingly, dynamic voltage scaling is widely used as part of
> > strategies to manage switching power consumption in battery powered
> > devices such as cell phones and laptop computers. Low voltage modes
> > are used in conjunction with lowered clock frequencies to minimize
> > power consumption associated with components such as CPUs and DSPs;
> > only when significant computational power is needed will the voltage
> > and frequency be raised.
> >
> > Some peripherals also support low voltage operational modes. For
> > example, low power MMC and SD cards can run at 1.8 V as well as at
> > 3.3 V, and driver stacks may conserve power by switching to the
> > lower voltage after detecting a card which supports it.
> >
> > When leakage current is a significant factor in terms of power
> > consumption, chips are often designed so that portions of them can
> > be powered completely off. This is not usually viewed as being
> > dynamic voltage scaling, because it is not transparent to software.
> > When sections of chips can be turned off, as for example on TI OMAP3
> > processors, drivers and other support software need to support that.
> >
> > http://en.wikipedia.org/wiki/Dynamic_voltage_scaling
> >
> > Leakage current typically gets higher with higher frequencies, but
> > it's also highly process dependent AFAIK.
Strictly speaking leakage current gets higher with voltage, not
frequency (well, not to an extend where we should care). However,
frequency increase typically implies a voltage increase, so in that
sense I agree.
> >
> > If switching power dissipation is the main factor in power use, then
> > we can essentially assume that P ~ V^2, at the same frequency - and
> > scales linearly with frequency - but real work performed also scales
> > semi-linearly with frequency for many workloads, so that's an
> > invariant for everything except highly memory bound workloads.
AFAIK, there isn't much sense in running a slower frequency than the
highest one supported at a given voltage unless there are specific
reasons not to (peripherals that keeps the system up anyway and such).
In the general case, I think it is safe to assume that energy-efficiency
goes down for every increase in frequency. Modern ARM platforms
typically have different voltages for more or less all frequencies (TC2
is quite atypical). The voltage increases more rapidly than the
frequency which makes the higher frequencies extremely expensive in
terms of energy-efficiency.
All of this is of course without considering power gating which allow us
to eliminate the leakage power (or at least partially eliminate it)
when idle. So, while energy-efficiency is bad at high frequencies, it
might pay off overall to use them anyway if we can save more leakage
energy while idle than we burn extra to race to idle. This is where the
platform energy model becomes useful.
> So in practice this probably means that Turbo probably has a somewhat
> super-linear power use factor.
I'm not familiar with the voltage scaling on Intel platforms, but as
said above, I think power always scales up faster than performance. It
can probably be ignored for lower frequencies, but for the higher ones,
the extra energy per instruction executed is significant.
> At lower frequencies the leakage current difference is probably
> negligible.
It is still there, but it is smaller due to the reduced voltage and so
is the dynamic power.
> In any case, even with turbo frequencies, switching power use is
> probably an order of magnitude higher than leakage current power use,
> on any marketable chip,
That strongly depends on the process and the gate library used, but I
agree that dynamic power should be our primary focus.
> so we should concentrate on being able to
> cover this first order effect (P/work ~ V^2), before considering any
> second order effects (leakage current).
I think we should be fine as long as we include the leakage power in the
'busy' power consumption and know the idle-state power consumption in
the idle-states. I already do this in the TC2 model. That way we don't
have to distinguish between leakage and dynamic power.
Morten
next prev parent reply other threads:[~2014-06-06 14:11 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 18:16 [RFC PATCH 00/16] sched: Energy cost model for energy-aware scheduling Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 01/16] sched: Documentation for scheduler energy cost model Morten Rasmussen
2014-06-05 8:49 ` Vincent Guittot
2014-06-05 11:35 ` Morten Rasmussen
2014-06-05 15:02 ` Vincent Guittot
2014-05-23 18:16 ` [RFC PATCH 02/16] sched: Introduce CONFIG_SCHED_ENERGY Morten Rasmussen
2014-06-08 6:03 ` Henrik Austad
2014-06-09 10:20 ` Morten Rasmussen
2014-06-10 9:39 ` Peter Zijlstra
2014-06-10 10:06 ` Morten Rasmussen
2014-06-10 10:23 ` Peter Zijlstra
2014-06-10 11:17 ` Henrik Austad
2014-06-10 12:19 ` Peter Zijlstra
2014-06-10 11:24 ` Morten Rasmussen
2014-06-10 12:24 ` Peter Zijlstra
2014-06-10 14:41 ` Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 03/16] sched: Introduce sd energy data structures Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 04/16] sched: Allocate and initialize sched energy Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 05/16] sched: Add sd energy procfs interface Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler Morten Rasmussen
2014-05-30 12:04 ` Peter Zijlstra
2014-06-02 14:15 ` Morten Rasmussen
2014-06-03 11:41 ` Peter Zijlstra
2014-06-04 13:49 ` Morten Rasmussen
2014-06-03 11:44 ` Peter Zijlstra
2014-06-04 15:42 ` Morten Rasmussen
2014-06-04 16:16 ` Peter Zijlstra
2014-06-06 13:15 ` Morten Rasmussen
2014-06-06 13:43 ` Peter Zijlstra
2014-06-06 14:29 ` Morten Rasmussen
2014-06-12 15:05 ` Vince Weaver
2014-06-03 11:50 ` Peter Zijlstra
2014-06-04 16:02 ` Morten Rasmussen
2014-06-04 17:27 ` Peter Zijlstra
2014-06-04 21:56 ` Rafael J. Wysocki
2014-06-05 6:52 ` Peter Zijlstra
2014-06-05 15:03 ` Dirk Brandewie
2014-06-05 20:29 ` Yuyang Du
2014-06-06 8:05 ` Peter Zijlstra
2014-06-06 0:35 ` Yuyang Du
2014-06-06 10:50 ` Peter Zijlstra
2014-06-06 12:13 ` Ingo Molnar
2014-06-06 12:27 ` Ingo Molnar
2014-06-06 14:11 ` Morten Rasmussen [this message]
2014-06-07 2:33 ` Nicolas Pitre
2014-06-09 8:27 ` Morten Rasmussen
2014-06-09 13:22 ` Nicolas Pitre
2014-06-11 11:02 ` Eduardo Valentin
2014-06-11 11:42 ` Morten Rasmussen
2014-06-11 11:43 ` Eduardo Valentin
2014-06-11 13:37 ` Morten Rasmussen
2014-06-07 23:53 ` Yuyang Du
2014-06-07 23:26 ` Yuyang Du
2014-06-09 8:59 ` Morten Rasmussen
2014-06-09 2:15 ` Yuyang Du
2014-06-10 10:16 ` Peter Zijlstra
2014-06-10 17:01 ` Nicolas Pitre
2014-06-10 18:35 ` Yuyang Du
2014-06-06 16:27 ` Jacob Pan
2014-06-06 13:03 ` Morten Rasmussen
2014-06-07 2:52 ` Nicolas Pitre
2014-05-23 18:16 ` [RFC PATCH 07/16] sched: Introduce system-wide sched_energy Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 08/16] sched: Introduce SD_SHARE_CAP_STATES sched_domain flag Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 09/16] sched, cpufreq: Introduce current cpu compute capacity into scheduler Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 10/16] sched, cpufreq: Current compute capacity hack for ARM TC2 Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 11/16] sched: Energy model functions Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 12/16] sched: Task wakeup tracking Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 13/16] sched: Take task wakeups into account in energy estimates Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 14/16] sched: Use energy model in select_idle_sibling Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 15/16] sched: Use energy to guide wakeup task placement Morten Rasmussen
2014-05-23 18:16 ` [RFC PATCH 16/16] sched: Disable wake_affine to broaden the scope of wakeup target cpus Morten Rasmussen
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=20140606141154.GW29593@e103034-lin \
--to=morten.rasmussen@arm.com \
--cc=Dietmar.Eggemann@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dirk.brandewie@gmail.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=preeti@linux.vnet.ibm.com \
--cc=rjw@rjwysocki.net \
--cc=vincent.guittot@linaro.org \
--cc=yuyang.du@intel.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).