Re: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints

2013-10-14 Thread Morten Rasmussen
On Mon, Oct 14, 2013 at 02:48:09PM +0100, Peter Zijlstra wrote: > On Fri, Oct 11, 2013 at 06:19:13PM +0100, Morten Rasmussen wrote: > > +static inline void inc_cpu_capacity(int cpu) > > +{ > > + if (weighted_cpuload(cpu) > power_of(cpu)) > > + go_faster(cpu, 0); > > +} > > + > > +static

Re: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints

2013-10-14 Thread Peter Zijlstra
On Fri, Oct 11, 2013 at 06:19:13PM +0100, Morten Rasmussen wrote: > +static inline void inc_cpu_capacity(int cpu) > +{ > + if (weighted_cpuload(cpu) > power_of(cpu)) > + go_faster(cpu, 0); > +} > + > +static inline void dec_cpu_capacity(int cpu) > +{ > + if (weighted_cpuload(cpu

Re: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints

2013-10-14 Thread Morten Rasmussen
Hi Michael, On Sat, Oct 12, 2013 at 03:58:07AM +0100, Michael wang wrote: > Hi, Morten > > On 10/12/2013 01:19 AM, Morten Rasmussen wrote: > [snip] > > > > @@ -5743,6 +5772,7 @@ static void run_rebalance_domains(struct > > softirq_action *h) > > */ > > nohz_idle_balance(this_cpu, idle

Re: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints

2013-10-11 Thread Michael wang
Hi, Morten On 10/12/2013 01:19 AM, Morten Rasmussen wrote: [snip] > > @@ -5743,6 +5772,7 @@ static void run_rebalance_domains(struct softirq_action > *h) >*/ > nohz_idle_balance(this_cpu, idle); > > + inc_cpu_capacity(this_cpu); Just wondering is this check necessary here?

[RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints

2013-10-11 Thread Morten Rasmussen
Adds power driver hints at task enqueue/dequeue and at the sched tick if the new cpu load doesn't match the current cpu capacity. The optional hint argument of go_faster/slower calls is currently unused. It is meant to give the power driver a rough estimate of how much more/less cpu capacity is nee