[RFC][PATCH] sched/numa: fix the wrong logical inside task_numa_migrate()

From: Michael wang
Date: Mon Oct 14 2013 - 05:20:17 EST


As the comment said, we want a node benefit BOTH task and group, thus the
condition to skip the node should be:

taskimp < 0 || groupimp < 0

CC: Mel Gorman <mgorman@xxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxxxxx>
CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Michael Wang <wangyun@xxxxxxxxxxxxxxxxxx>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 803e343..53e3ba9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1225,7 +1225,7 @@ static int task_numa_migrate(struct task_struct *p)
/* Only consider nodes where both task and groups benefit */
taskimp = task_weight(p, nid) - taskweight;
groupimp = group_weight(p, nid) - groupweight;
- if (taskimp < 0 && groupimp < 0)
+ if (taskimp < 0 || groupimp < 0)
continue;

env.dst_nid = nid;
--
1.7.9.5

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