diff options
author | Rik van Riel <riel@redhat.com> | 2014-06-23 11:46:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-05 05:17:37 -0400 |
commit | 1c5d3eb3759013bc7ee4197aa0a9f245bdb6eb90 (patch) | |
tree | 40e613c451a1a8420fb744c184aebd42da419ed5 | |
parent | 6dc1a672ab15604947361dcd02e459effa09bad5 (diff) |
sched/numa: Simplify task_numa_compare()
When a task is part of a numa_group, the comparison should always use
the group weight, in order to make workloads converge.
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: chegu_vinod@hp.com
Cc: mgorman@suse.de
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1403538378-31571-4-git-send-email-riel@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/sched/fair.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d6526d2cf173..cebb312e874b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -1154,7 +1154,7 @@ static void task_numa_compare(struct task_numa_env *env, | |||
1154 | struct task_group *tg; | 1154 | struct task_group *tg; |
1155 | long src_load, dst_load; | 1155 | long src_load, dst_load; |
1156 | long load; | 1156 | long load; |
1157 | long imp = (groupimp > 0) ? groupimp : taskimp; | 1157 | long imp = env->p->numa_group ? groupimp : taskimp; |
1158 | 1158 | ||
1159 | rcu_read_lock(); | 1159 | rcu_read_lock(); |
1160 | cur = ACCESS_ONCE(dst_rq->curr); | 1160 | cur = ACCESS_ONCE(dst_rq->curr); |
@@ -1192,11 +1192,6 @@ static void task_numa_compare(struct task_numa_env *env, | |||
1192 | * itself (not part of a group), use the task weight | 1192 | * itself (not part of a group), use the task weight |
1193 | * instead. | 1193 | * instead. |
1194 | */ | 1194 | */ |
1195 | if (env->p->numa_group) | ||
1196 | imp = groupimp; | ||
1197 | else | ||
1198 | imp = taskimp; | ||
1199 | |||
1200 | if (cur->numa_group) | 1195 | if (cur->numa_group) |
1201 | imp += group_weight(cur, env->src_nid) - | 1196 | imp += group_weight(cur, env->src_nid) - |
1202 | group_weight(cur, env->dst_nid); | 1197 | group_weight(cur, env->dst_nid); |