Re: [PATCH V5 3/8] sched: remove source_load and target_load

From: Peter Zijlstra
Date: Thu Apr 24 2014 - 10:18:38 EST


On Wed, Apr 16, 2014 at 10:43:24AM +0800, Alex Shi wrote:
> We have no load_idx any more, so source/target_load always return the
> same value as weighted_cpuload. So we can remove these 2 functions.

That's just not true:

> -/*
> - * Return a low guess at the load of a migration-source cpu weighted
> - * according to the scheduling class and "nice" value.
> - *
> - * We want to under-estimate the load of migration sources, to
> - * balance conservatively.
> - */
> -static unsigned long source_load(int cpu)
> -{
> - struct rq *rq = cpu_rq(cpu);
> - unsigned long total = weighted_cpuload(cpu);
> -
> - if (!sched_feat(LB_BIAS))
> - return total;
> -
> - return min(rq->cpu_load, total);
> -}
> -
> -/*
> - * Return a high guess at the load of a migration-target cpu weighted
> - * according to the scheduling class and "nice" value.
> - */
> -static unsigned long target_load(int cpu)
> -{
> - struct rq *rq = cpu_rq(cpu);
> - unsigned long total = weighted_cpuload(cpu);
> -
> - if (!sched_feat(LB_BIAS))
> - return total;
> -
> - return max(rq->cpu_load, total);
> -}


--
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/