Re: [PATCH] sched/fair: Fix kernel build warning in test_idle_cores() for !SMT NUMA

From: Valentin Schneider
Date: Tue Mar 03 2020 - 05:08:50 EST


On 2/27/20 2:02 PM, Mel Gorman wrote:
> Building against tip/sched/core as of as ff7db0bf24db ("sched/numa: Prefer
> using an idle CPU as a migration target instead of comparing tasks") with
> the arm64 defconfig (which doesn't have CONFIG_SCHED_SMT set) leads to:
>
> kernel/sched/fair.c:1525:20: warning: â??test_idle_coresâ?? declared â??staticâ?? but never defined [-Wunused-function]
^ ^ ^ ^
For some reason the quotes got turned into â in your edit. Doesn't really
matter TBH.

> static inline bool test_idle_cores(int cpu, bool def);
> ^~~~~~~~~~~~~~~
>
> Rather than define it in its own CONFIG_SCHED_SMT #define island, bunch it
> up with test_idle_cores().
>
> Fixes: ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks")
> [mgorman@xxxxxxxxxxxxxxxxxxx: Edit changelog, minor style change]
> Signed-off-by: Valentin Schneider <valentin.schneider@xxxxxxx>
> Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>

Could we get this in tip (and hopefully -next will follow shortly)? We're at
like the third duplicate fix on the list already.