lkml.org 
[lkml]   [2014]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 11/12] sched: replace capacity_factor by utilization
On Sun, Sep 14, 2014 at 09:41:56PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 11, 2014 at 07:26:48PM +0200, Vincent Guittot wrote:
> > On 11 September 2014 18:15, Peter Zijlstra <peterz@infradead.org> wrote:
> > > On Tue, Aug 26, 2014 at 01:06:54PM +0200, Vincent Guittot wrote:
> > >> +static inline int group_has_free_capacity(struct sg_lb_stats *sgs,
> > >> + struct lb_env *env)
> > >> {
> > >> + if ((sgs->group_capacity_orig * 100) >
> > >> + (sgs->group_utilization * env->sd->imbalance_pct))
> > >> + return 1;
> > >> +
> > >> + if (sgs->sum_nr_running < sgs->group_weight)
> > >> + return 1;
> > >>
> > >> + return 0;
> > >> +}
> > >>
> > >> +static inline int group_is_overloaded(struct sg_lb_stats *sgs,
> > >> + struct lb_env *env)
> > >> +{
> > >> + if (sgs->sum_nr_running <= sgs->group_weight)
> > >> + return 0;
> > >>
> > >> + if ((sgs->group_capacity_orig * 100) <
> > >> + (sgs->group_utilization * env->sd->imbalance_pct))
> > >> + return 1;
> > >>
> > >> + return 0;
> > >> }
> > >
> > > I'm confused about the utilization vs capacity_orig. I see how we should
> >
> > 1st point is that I should compare utilization vs capacity and not
> > capacity_orig.
> > I should have replaced capacity_orig by capacity in the functions
> > above when i move the utilization statistic from
> > rq->avg.runnable_avg_sum to cfs.usage_load_avg.
> > rq->avg.runnable_avg_sum was measuring all activity on the cpu whereas
> > cfs.usage_load_avg integrates only cfs tasks
> >
> > With this change, we don't need sgs->group_capacity_orig anymore but
> > only sgs->group_capacity. So sgs->group_capacity_orig can be removed
> > as it's no more used in the code as sg_capacity_factor has been
> > removed
>
> Yes, but.. so I suppose we need to add DVFS accounting and remove
> cpufreq from the capacity thing. Otherwise I don't see it make sense.

That is to say, please also explain these details in the changelog, and
preferably also in a XXX/FIXME/TODO comment near wherever so we don't
forget about it.


\
 
 \ /
  Last update: 2014-09-14 22:01    [W:0.167 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site