lkml.org 
[lkml]   [2014]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 6/7] sched: replace capacity_factor by usage
On Tue, Oct 07, 2014 at 02:13:36PM +0200, Vincent Guittot wrote:
> +static inline bool
> +group_has_capacity(struct lb_env *env, struct sg_lb_stats *sgs)
> {
> + if ((sgs->group_capacity * 100) >
> + (sgs->group_usage * env->sd->imbalance_pct))
> + return true;

Why the imb_pct there? We're looking for 100% utilization, not 130 or
whatnot, right?

> + if (sgs->sum_nr_running < sgs->group_weight)
> + return true;

With the code as it stands, this is the cheaper test (no mults) so why
is it second?

> + return false;
> +}
>
> +static inline bool
> +group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs)
> +{
> + if (sgs->sum_nr_running <= sgs->group_weight)
> + return false;
> +
> + if ((sgs->group_capacity * 100) <
> + (sgs->group_usage * env->sd->imbalance_pct))
> + return true;
>
> + return false;
> }

Same thing here wrt imb_pct


\
 
 \ /
  Last update: 2014-10-09 14:42    [W:0.164 / U:65.520 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site