Skip to content

Commit

Permalink
sched/numa: Fix is_core_idle()
Browse files Browse the repository at this point in the history
Use the loop variable instead of the function argument to test the
other SMT siblings for idle.

Fixes: ff7db0b ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks")
Signed-off-by: Mika Penttilä <mika.penttila@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Link: https://lkml.kernel.org/r/20210722063946.28951-1-mika.penttila@gmail.com
  • Loading branch information
mjp111 authored and Peter Zijlstra committed Aug 4, 2021
1 parent 031e3bd commit 1c6829c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ static inline bool is_core_idle(int cpu)
if (cpu == sibling)
continue;

if (!idle_cpu(cpu))
if (!idle_cpu(sibling))
return false;
}
#endif
Expand Down

0 comments on commit 1c6829c

Please sign in to comment.