sched/fair: Fix kernel build warning in test_idle_cores() for !SMT NUMA
PATCH 1/1 sched/fair: Fix kernel build warning in test_idle_cores() for !SMT NUMA
Fix kernel build warning in kernel/sched/fair.c when CONFIG_SCHED_SMT is not set and CONFIG_NUMA_BALANCING is set.
kernel/sched/fair.c:1524:20: warning: ‘test_idle_cores’ declared ‘static’ but never defined [-Wunused-function]
---
It's on top of tip [1] master branch (which has a merge of sched/urgent).
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
kernel/sched/fair.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/sched/fair.c +2 -0
@@ -1520,8 +1520,10 @@ static inline bool is_core_idle(int cpu)return true; } +#ifdef CONFIG_SCHED_SMT /* Forward declarations of select_idle_sibling helpers */ static inline bool test_idle_cores (int cpu,bool def); +#endif struct task_numa_env {struct task_struct *p;
Signature · 1 line
2.17.1
Hi Lukasz,
Quoted 5 lines · Lukasz Luba
Fix kernel build warning in
kernel/sched/fair.cwhenCONFIG_SCHED_SMTis not set andCONFIG_NUMA_BALANCINGis set.
kernel/sched/fair.c:1524:20: warning: ‘test_idle_cores’ declared ‘static’ but never defined [-Wunused-function]
I've sent a similar fix yesterday at:
Hi Valentin,
Quoted 6 lines · Valentin Schneider
Hi Lukasz,
Quoted 3 lines · Lukasz Luba
Fix kernel build warning in
kernel/sched/fair.cwhenCONFIG_SCHED_SMTis not set andCONFIG_NUMA_BALANCINGis set.
Quoted 7 lines
Quoted 2 lines
kernel/sched/fair.c:1524:20: warning: ‘test_idle_cores’ declared ‘static’ but never defined [-Wunused-function]I've sent a similar fix yesterday at:
I've missed it. You are referring in the commit message to wrong change
(probably HEAD of that branch), while when you try to bisect, it
will point you toff7db0bf24db sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks
I think Mel can simply resend the patches with correct build if Ingo is OK.
If Mel would decide to go with extended approach of ifdefs, then maybe it's also good to put in there numa_idle_core(), which actually uses these test_idle_cores() and is_core_idle()
Regards,
Lukasz
Quoted 23 lines · Lukasz Luba
Hi Valentin,
Quoted 6 lines · Valentin Schneider
Hi Lukasz,
Quoted 3 lines · Lukasz Luba
Fix kernel build warning in
kernel/sched/fair.cwhenCONFIG_SCHED_SMTis not set andCONFIG_NUMA_BALANCINGis set.Quoted 7 lines
Quoted 2 lines
kernel/sched/fair.c:1524:20: warning: ???test_idle_cores??? declared ???static??? but never defined [-Wunused-function]I've sent a similar fix yesterday at:
I've missed it. You are referring in the commit message to wrong change (probably HEAD of that branch), while when you try to bisect, it will point you to
ff7db0bf24dbsched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks
Quoted 7 lines
I think Mel can simply resend the patches with correct build if Ingo is OK.
If Mel would decide to go with extended approach of ifdefs, then maybe it's also good to put in there
numa_idle_core(), which actually uses thesetest_idle_cores()andis_core_idle()
I preferred the first fix. I'll send just it on with an editted changelog to identify the exact patch that caused the problem. Ingo will hopefully let me know if he prefers to pick up the fix on top or a resend of the series with the fix folded in.
Signature · 2 lines
Mel Gorman SUSE Labs