Skip to content

Commit 1662867

Browse files
Rik van Rieltorvalds
authored andcommitted
numa,sched: fix load_to_imbalanced logic inversion
This function is supposed to return true if the new load imbalance is worse than the old one. It didn't. I can only hope brown paper bags are in style. Now things converge much better on both the 4 node and 8 node systems. I am not sure why this did not seem to impact specjbb performance on the 4 node system, which is the system I have full-time access to. This bug was introduced recently, with commit e63da03 ("sched/numa: Allow task switch if load imbalance improves") Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b738d76 commit 1662867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/fair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ static bool load_too_imbalanced(long orig_src_load, long orig_dst_load,
11201120
old_imb = orig_dst_load * 100 - orig_src_load * env->imbalance_pct;
11211121

11221122
/* Would this change make things worse? */
1123-
return (old_imb > imb);
1123+
return (imb > old_imb);
11241124
}
11251125

11261126
/*

0 commit comments

Comments
 (0)