lkml.org 
[lkml]   [2013]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games
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.


\
 
 \ /
  Last update: 2013-08-21 11:21    [W:0.076 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site