From: Mika Penttilä Date: Thu, 22 Jul 2021 06:39:46 +0000 (+0300) Subject: sched/numa: Fix is_core_idle() X-Git-Tag: v5.15-rc1~200^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c6829cfd3d5124b125e6df41158665aea413b35;p=thirdparty%2Fkernel%2Flinux.git sched/numa: Fix is_core_idle() Use the loop variable instead of the function argument to test the other SMT siblings for idle. Fixes: ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks") Signed-off-by: Mika Penttilä Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Acked-by: Pankaj Gupta Link: https://lkml.kernel.org/r/20210722063946.28951-1-mika.penttila@gmail.com --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 11d22943753fa..13c3fd40bd34b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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