Skip to content

Commit e720fff

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/numa: Revert "Use effective_load() to balance NUMA loads"
Due to divergent trees, Rik find that this patch is no longer required. Requested-by: Rik van Riel <riel@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/n/tip-u6odkgkw8wz3m7orgsjfo5pi@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 5cd08fb commit e720fff

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

kernel/sched/fair.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,6 @@ static void task_numa_compare(struct task_numa_env *env,
11511151
struct rq *src_rq = cpu_rq(env->src_cpu);
11521152
struct rq *dst_rq = cpu_rq(env->dst_cpu);
11531153
struct task_struct *cur;
1154-
struct task_group *tg;
11551154
long src_load, dst_load;
11561155
long load;
11571156
long imp = env->p->numa_group ? groupimp : taskimp;
@@ -1223,14 +1222,9 @@ static void task_numa_compare(struct task_numa_env *env,
12231222
* In the overloaded case, try and keep the load balanced.
12241223
*/
12251224
balance:
1226-
src_load = env->src_stats.load;
1227-
dst_load = env->dst_stats.load;
1228-
1229-
/* Calculate the effect of moving env->p from src to dst. */
1230-
load = env->p->se.load.weight;
1231-
tg = task_group(env->p);
1232-
src_load += effective_load(tg, env->src_cpu, -load, -load);
1233-
dst_load += effective_load(tg, env->dst_cpu, load, load);
1225+
load = task_h_load(env->p);
1226+
dst_load = env->dst_stats.load + load;
1227+
src_load = env->src_stats.load - load;
12341228

12351229
if (moveimp > imp && moveimp > env->best_imp) {
12361230
/*
@@ -1250,11 +1244,9 @@ static void task_numa_compare(struct task_numa_env *env,
12501244
goto unlock;
12511245

12521246
if (cur) {
1253-
/* Cur moves in the opposite direction. */
1254-
load = cur->se.load.weight;
1255-
tg = task_group(cur);
1256-
src_load += effective_load(tg, env->src_cpu, load, load);
1257-
dst_load += effective_load(tg, env->dst_cpu, -load, -load);
1247+
load = task_h_load(cur);
1248+
dst_load -= load;
1249+
src_load += load;
12581250
}
12591251

12601252
if (load_too_imbalanced(src_load, dst_load, env))

0 commit comments

Comments
 (0)