Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-12 Thread Vince Weaver
On Fri, 6 Jun 2014, Morten Rasmussen wrote: > On Fri, Jun 06, 2014 at 02:43:03PM +0100, Peter Zijlstra wrote: > > On Fri, Jun 06, 2014 at 02:15:10PM +0100, Morten Rasmussen wrote: > > > > > ARM TC2 has on-chip energy counters for counting energy consumed by > > > > > the > > > > > A7 and A15 clus

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-11 Thread Morten Rasmussen
On Wed, Jun 11, 2014 at 12:43:26PM +0100, Eduardo Valentin wrote: > On Wed, Jun 11, 2014 at 12:42:18PM +0100, Morten Rasmussen wrote: > > On Wed, Jun 11, 2014 at 12:02:51PM +0100, Eduardo Valentin wrote: > > > Hello, > > > > > > On Mon, Jun 09, 2014 at 09:22:49AM -0400, Nicolas Pitre wrote: > > >

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-11 Thread Eduardo Valentin
On Wed, Jun 11, 2014 at 12:42:18PM +0100, Morten Rasmussen wrote: > On Wed, Jun 11, 2014 at 12:02:51PM +0100, Eduardo Valentin wrote: > > Hello, > > > > On Mon, Jun 09, 2014 at 09:22:49AM -0400, Nicolas Pitre wrote: > > > On Mon, 9 Jun 2014, Morten Rasmussen wrote: > > > > > > > On Sat, Jun 07, 2

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-11 Thread Morten Rasmussen
On Wed, Jun 11, 2014 at 12:02:51PM +0100, Eduardo Valentin wrote: > Hello, > > On Mon, Jun 09, 2014 at 09:22:49AM -0400, Nicolas Pitre wrote: > > On Mon, 9 Jun 2014, Morten Rasmussen wrote: > > > > > On Sat, Jun 07, 2014 at 03:33:58AM +0100, Nicolas Pitre wrote: > > > > On Fri, 6 Jun 2014, Ingo M

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-11 Thread Eduardo Valentin
Hello, On Mon, Jun 09, 2014 at 09:22:49AM -0400, Nicolas Pitre wrote: > On Mon, 9 Jun 2014, Morten Rasmussen wrote: > > > On Sat, Jun 07, 2014 at 03:33:58AM +0100, Nicolas Pitre wrote: > > > On Fri, 6 Jun 2014, Ingo Molnar wrote: > > > > > > > In any case, even with turbo frequencies, switching

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-10 Thread Yuyang Du
On Tue, Jun 10, 2014 at 12:16:22PM +0200, Peter Zijlstra wrote: > What other target would you optimize for? The purpose here is to build > an energy aware scheduler, one that schedules tasks so that the total > amount of energy, for the given amount of work, is minimal. > > So we can't measure in

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-10 Thread Nicolas Pitre
On Tue, 10 Jun 2014, Peter Zijlstra wrote: > So the current cpufreq stuff is terminally broken in too many ways; its > sampling, so it misses a lot of changes, its strictly cpu local, so it > completely misses SMP information (like the migrations etc..) > > If we move a 50% task from CPU1 to CPU0

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-10 Thread Peter Zijlstra
On Sun, Jun 08, 2014 at 07:26:29AM +0800, Yuyang Du wrote: > Ok. I think we understand each other. But one more thing, I said P ~ V^3, > because P ~ V^2*f and f ~ V, so P ~ V^3. Maybe some frequencies share the same > voltage, but you can still safely assume V changes with f in general, and it > wi

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-09 Thread Nicolas Pitre
On Mon, 9 Jun 2014, Morten Rasmussen wrote: > On Sat, Jun 07, 2014 at 03:33:58AM +0100, Nicolas Pitre wrote: > > On Fri, 6 Jun 2014, Ingo Molnar wrote: > > > > > In any case, even with turbo frequencies, switching power use is > > > probably an order of magnitude higher than leakage current powe

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-09 Thread Yuyang Du
On Mon, Jun 09, 2014 at 09:59:52AM +0100, Morten Rasmussen wrote: > IMHO, the per-entity load-tracking does a fair job representing the task > compute capacity requirements. Sure it isn't perfect, particularly not > for memory bound tasks, but it is way better than not having any task > history at

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-09 Thread Morten Rasmussen
On Sun, Jun 08, 2014 at 12:26:29AM +0100, Yuyang Du wrote: > On Fri, Jun 06, 2014 at 12:50:36PM +0200, Peter Zijlstra 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 tim

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-09 Thread Morten Rasmussen
On Sat, Jun 07, 2014 at 03:33:58AM +0100, Nicolas Pitre wrote: > On Fri, 6 Jun 2014, Ingo Molnar wrote: > > > 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, so we should concen

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-08 Thread Yuyang Du
On Fri, Jun 06, 2014 at 02:13:05PM +0200, Ingo Molnar wrote: > > Leakage current typically gets higher with higher frequencies, but > it's also highly process dependent AFAIK. > In general, you can assume leakage power ~ V^2. > If switching power dissipation is the main factor in power use, th

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-08 Thread Yuyang Du
On Fri, Jun 06, 2014 at 12:50:36PM +0200, Peter Zijlstra 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. > > > can't say which is more important, or there is no

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Nicolas Pitre
On Wed, 4 Jun 2014, Peter Zijlstra wrote: > On Wed, Jun 04, 2014 at 05:02:30PM +0100, Morten Rasmussen wrote: > > On Tue, Jun 03, 2014 at 12:50:15PM +0100, Peter Zijlstra wrote: > > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > > +static struct capacity_state cap_states

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Nicolas Pitre
On Fri, 6 Jun 2014, Ingo Molnar wrote: > 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, so we should concentrate on being able to > cover this first order effect (P/work ~ V^2), b

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Jacob Pan
On Fri, 6 Jun 2014 08:35:21 +0800 Yuyang Du wrote: > On Fri, Jun 06, 2014 at 10:05:43AM +0200, Peter Zijlstra wrote: > > On Fri, Jun 06, 2014 at 04:29:30AM +0800, Yuyang Du wrote: > > > On Thu, Jun 05, 2014 at 08:03:15AM -0700, Dirk Brandewie wrote: > > > > > > > > You can request a P state per

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Morten Rasmussen
On Fri, Jun 06, 2014 at 02:43:03PM +0100, Peter Zijlstra wrote: > On Fri, Jun 06, 2014 at 02:15:10PM +0100, Morten Rasmussen wrote: > > > > ARM TC2 has on-chip energy counters for counting energy consumed by the > > > > A7 and A15 clusters. They are fairly accurate. > > > > > > Recent Intel chips

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Morten Rasmussen
On Fri, Jun 06, 2014 at 01:27:40PM +0100, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > * Peter Zijlstra wrote: > > > > > > Voltage is combined with frequency, roughly, voltage is > > > > proportional to freuquecy, so roughly, power is proportionaly to > > > > voltage^3. You > > > > > >

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Peter Zijlstra
On Fri, Jun 06, 2014 at 02:15:10PM +0100, Morten Rasmussen wrote: > > > ARM TC2 has on-chip energy counters for counting energy consumed by the > > > A7 and A15 clusters. They are fairly accurate. > > > > Recent Intel chips have that too; they come packaged as: > > > > perf stat -a -e "power/e

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Morten Rasmussen
On Wed, Jun 04, 2014 at 05:16:18PM +0100, Peter Zijlstra wrote: > On Wed, Jun 04, 2014 at 04:42:27PM +0100, Morten Rasmussen wrote: > > On Tue, Jun 03, 2014 at 12:44:28PM +0100, Peter Zijlstra wrote: > > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > > +static struct capa

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Morten Rasmussen
On Wed, Jun 04, 2014 at 06:27:12PM +0100, Peter Zijlstra wrote: > On Wed, Jun 04, 2014 at 05:02:30PM +0100, Morten Rasmussen wrote: > > On Tue, Jun 03, 2014 at 12:50:15PM +0100, Peter Zijlstra wrote: > > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > > +static struct capa

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Ingo Molnar
* Ingo Molnar wrote: > * Peter Zijlstra 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 gat

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Ingo Molnar
* Peter Zijlstra 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

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Peter Zijlstra
On Fri, Jun 06, 2014 at 08:35:21AM +0800, Yuyang Du wrote: > > > Actually, silicon supports indepdent non-Turbo pstate, but just not > > > enabled. > > > > Then it doesn't exist, so no point in mentioning it. > > > > Well, things actually get more complicated. Not-enabled is for Core. For Atom

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Yuyang Du
On Fri, Jun 06, 2014 at 10:05:43AM +0200, Peter Zijlstra wrote: > On Fri, Jun 06, 2014 at 04:29:30AM +0800, Yuyang Du wrote: > > On Thu, Jun 05, 2014 at 08:03:15AM -0700, Dirk Brandewie wrote: > > > > > > You can request a P state per core but the package does coordination at > > > a package level

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-06 Thread Peter Zijlstra
On Fri, Jun 06, 2014 at 04:29:30AM +0800, Yuyang Du wrote: > On Thu, Jun 05, 2014 at 08:03:15AM -0700, Dirk Brandewie wrote: > > > > You can request a P state per core but the package does coordination at > > a package level for the P state that will be used based on all requests. > > This is due

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-05 Thread Yuyang Du
On Thu, Jun 05, 2014 at 08:03:15AM -0700, Dirk Brandewie wrote: > > You can request a P state per core but the package does coordination at > a package level for the P state that will be used based on all requests. > This is due to the fact that most SKUs have a single VR and PLL. So > the highest

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-05 Thread Dirk Brandewie
On 06/04/2014 11:52 PM, Peter Zijlstra wrote: On Wed, Jun 04, 2014 at 11:56:55PM +0200, Rafael J. Wysocki wrote: On Wednesday, June 04, 2014 07:27:12 PM Peter Zijlstra wrote: Well, we eventually want to go there I think. Although we still needed to come up with something for Intel, because I'

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Peter Zijlstra
On Wed, Jun 04, 2014 at 11:56:55PM +0200, Rafael J. Wysocki wrote: > On Wednesday, June 04, 2014 07:27:12 PM Peter Zijlstra wrote: > > Well, we eventually want to go there I think. Although we still needed > > to come up with something for Intel, because I'm not at all sure how all > > that works.

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Rafael J. Wysocki
On Wednesday, June 04, 2014 07:27:12 PM Peter Zijlstra wrote: > On Wed, Jun 04, 2014 at 05:02:30PM +0100, Morten Rasmussen wrote: > > On Tue, Jun 03, 2014 at 12:50:15PM +0100, Peter Zijlstra wrote: > > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > > +static struct capaci

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Peter Zijlstra
On Wed, Jun 04, 2014 at 05:02:30PM +0100, Morten Rasmussen wrote: > On Tue, Jun 03, 2014 at 12:50:15PM +0100, Peter Zijlstra wrote: > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > +static struct capacity_state cap_states_cluster_a7[] = { > > > + /* Cluster only power */

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Peter Zijlstra
On Wed, Jun 04, 2014 at 04:42:27PM +0100, Morten Rasmussen wrote: > On Tue, Jun 03, 2014 at 12:44:28PM +0100, Peter Zijlstra wrote: > > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > > +static struct capacity_state cap_states_cluster_a7[] = { > > > + /* Cluster only power */

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Morten Rasmussen
On Tue, Jun 03, 2014 at 12:50:15PM +0100, Peter Zijlstra wrote: > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > +static struct capacity_state cap_states_cluster_a7[] = { > > + /* Cluster only power */ > > +{ .cap = 358, .power = 2967, }, /* 350 MHz */ > > +{ .cap

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Morten Rasmussen
On Tue, Jun 03, 2014 at 12:44:28PM +0100, Peter Zijlstra wrote: > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > +static struct capacity_state cap_states_cluster_a7[] = { > > + /* Cluster only power */ > > +{ .cap = 358, .power = 2967, }, /* 350 MHz */ > > +{ .cap

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-04 Thread Morten Rasmussen
On Tue, Jun 03, 2014 at 12:41:45PM +0100, Peter Zijlstra wrote: > On Mon, Jun 02, 2014 at 03:15:36PM +0100, Morten Rasmussen wrote: > > > > > > Talk to me about this core vs cluster thing. > > > > > > Why would an architecture have multiple energy domains like this? > > > The reason is that powe

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-03 Thread Peter Zijlstra
On Mon, Jun 02, 2014 at 03:15:36PM +0100, Morten Rasmussen wrote: > > > > Talk to me about this core vs cluster thing. > > > > Why would an architecture have multiple energy domains like this? > The reason is that power domains are often organized in a hierarchy > where you may be able to power

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-03 Thread Peter Zijlstra
On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > +static struct capacity_state cap_states_cluster_a7[] = { > + /* Cluster only power */ > + { .cap = 358, .power = 2967, }, /* 350 MHz */ > + { .cap = 410, .power = 2792, }, /* 400 MHz */ > + { .cap = 512, .p

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-03 Thread Peter Zijlstra
On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > +static struct capacity_state cap_states_cluster_a7[] = { > + /* Cluster only power */ > + { .cap = 358, .power = 2967, }, /* 350 MHz */ > + { .cap = 410, .power = 2792, }, /* 400 MHz */ > + { .cap = 512, .p

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-06-02 Thread Morten Rasmussen
On Fri, May 30, 2014 at 01:04:24PM +0100, Peter Zijlstra wrote: > On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > > +static struct capacity_state cap_states_cluster_a7[] = { > > + /* Cluster only power */ > > +{ .cap = 358, .power = 2967, }, /* 350 MHz */ > > +{ .cap

Re: [RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-05-30 Thread Peter Zijlstra
On Fri, May 23, 2014 at 07:16:33PM +0100, Morten Rasmussen wrote: > +static struct capacity_state cap_states_cluster_a7[] = { > + /* Cluster only power */ > + { .cap = 358, .power = 2967, }, /* 350 MHz */ > + { .cap = 410, .power = 2792, }, /* 400 MHz */ > + { .cap = 512, .p

[RFC PATCH 06/16] arm: topology: Define TC2 sched energy and provide it to scheduler

2014-05-23 Thread Morten Rasmussen
From: Dietmar Eggemann !!! This patch is only here to be able to test provisioning of sched energy related data from an arch topology shim layer to the scheduler. Since there is no code today which deals with extracting sched energy related data from the dtb or acpi, and process it in the topolog