@@ -3939,31 +3939,16 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
}
#ifdef CONFIG_SMP
-/* Used instead of source_load when we know the type == 0 */
-static inline unsigned long weighted_cpuload(const int cpu)
-{
- return cpu_rq(cpu)->cfs.runnable_load_avg;
-}
-
-/*
- * 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.
- */
+/* Return the real load of 'cpu' */
static unsigned long source_load(int cpu)
{
- return weighted_cpuload(cpu);
+ return cpu_rq(cpu)->cfs.runnable_load_avg;
}
-/*
- * Return a high guess at the load of a migration-target cpu weighted
- * according to the scheduling class and "nice" value.
- */
+/* Return a high bias at the load of a migration-target cpu weighted */
static unsigned long target_load(int cpu, int imbalance_pct)
{
- unsigned long total = weighted_cpuload(cpu);
+ unsigned long total = cpu_rq(cpu)->cfs.runnable_load_avg;
if (!sched_feat(LB_BIAS))
return total;
Although weighted_load is a inline founction, it's not needed in fact. so remove it. Signed-off-by: Alex Shi <alex.shi@linaro.org> --- kernel/sched/fair.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-)