Skip to contentSkip to conversation

sched/numa: fix the wrong logical inside task_numa_migrate()

RFC PATCH New Michael wang 1 participant 1 message Oct 14, 2013 Scheduler

lore
Share & tools
lore
#0 lore raw

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

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 <[email protected]>
CC Ingo Molnar <[email protected]>
CC Peter Zijlstra <[email protected]>
---
 kernel/sched/fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
index 803e343..53e3ba9 100644
@@ -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;
Signature · 1 line
1.7.9.5