Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memsetgames

From: Peter Zijlstra
Date: Wed Aug 21 2013 - 04:38:18 EST


On Wed, Aug 21, 2013 at 11:20:02AM +0900, Joonsoo Kim wrote:
> > With below change, we can simply do 'offsetof(struct sd_lb_stats, busiest_stat)'.
> >
> > @@ -4546,7 +4546,7 @@ static bool update_sd_pick_busiest(struct lb_env *env,
> > struct sched_group *sg,
> > struct sg_lb_stats *sgs)
> > {
> > - if (sgs->avg_load <= sds->busiest_stat.avg_load)
> > + if (!sds->busiest && sgs->avg_load <= sds->busiest_stat.avg_load)
> > return false;
> >
> > if (sgs->sum_nr_running > sgs->group_capacity)
> >
>
> Sorry, instead of !sds->busiest, it should be sds->busiest. :)

Of course ;-) However I'm not sure which I prefer.. adding this extra
condition or having the initialization extra tricky. I'll sit on it a
little longer.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/