Messages in this thread | | | Date | Wed, 21 Aug 2013 10:38:02 +0200 | From | Peter Zijlstra <> | Subject | Re: [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.
| |