Re: [RFC][PATCH 11/10] sched, fair: Reduce local_group logic

From: Peter Zijlstra
Date: Wed Aug 28 2013 - 05:17:19 EST


On Wed, Aug 28, 2013 at 10:55:42AM +0200, Peter Zijlstra wrote:
> @@ -4690,19 +4694,20 @@ static inline void update_sd_lb_stats(st
> * heaviest group when it is already under-utilized (possible
> * with a large weight task outweighs the tasks on the system).
> */
> + if (prefer_sibling && sds->local &&
> + sds->local_stat.group_has_capacity)
> sgs->group_capacity = min(sgs->group_capacity, 1U);

While we're here, I think its always true that sds->local is set,
because env->dst_cpu should always be part of the local group and the
local group is always sd->groups and since that now directly skips to
next_group we'll not get here without this being true.

Hmm?

>
> + if (update_sd_pick_busiest(env, sds, sg, sgs)) {
> sds->busiest = sg;
> sds->busiest_stat = *sgs;
> }
>
> +next_group:
> + /* Now, start updating sd_lb_stats */
> + sds->total_load += sgs->group_load;
> + sds->total_pwr += sgs->group_power;
> +
> sg = sg->next;
> } while (sg != env->sd->groups);
> }
--
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/