Skip to content

Commit a731ebe

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/fair: Fix wake_affine_llc() balancing rules
Chris Wilson reported that the SMT balance rules got the +1 on the wrong side, resulting in a bias towards the current LLC; which the load-balancer would then try and undo. Reported-by: Chris Wilson <[email protected]> Tested-by: Chris Wilson <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Fixes: 90001d6 ("sched/fair: Fix wake_affine() for !NUMA_BALANCING") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 24e700e commit a731ebe

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
@@ -5435,7 +5435,7 @@ wake_affine_llc(struct sched_domain *sd, struct task_struct *p,
54355435
return false;
54365436

54375437
/* if this cache has capacity, come here */
5438-
if (this_stats.has_capacity && this_stats.nr_running < prev_stats.nr_running+1)
5438+
if (this_stats.has_capacity && this_stats.nr_running+1 < prev_stats.nr_running)
54395439
return true;
54405440

54415441
/*

0 commit comments

Comments
 (0)