lkml.org 
[lkml]   [2013]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/7] sched: power: go_faster/slower power driver hints
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 inline void dec_cpu_capacity(int cpu)
> > +{
> > + if (weighted_cpuload(cpu) < power_of(cpu))
> > + go_slower(cpu, 0);
> > +}
>
> It seems wrong to me to use weighted_cpuload() here; that contains the
> task weight, which is irrelevant to power usage. I would expect a pure
> utilization term here.
>
> Something like:
>
> se->avg.runnable_avg_sum / se->avg.runnable_avg_period
>

Fully agree. There is no unweighted equivalent to cfs.runnable_load_avg
but we could add it. It would be very useful for the power-aware
scheduling. It will add some overhead though.

Morten



\
 
 \ /
  Last update: 2013-10-14 18:41    [W:0.465 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site