[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <158350572776.28353.575560040960927128.tip-bot2@tip-bot2>
Date: Fri, 06 Mar 2020 14:42:07 -0000
From: "tip-bot2 for Valentin Schneider" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Anshuman Khandual <anshuman.khandual@....com>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Lukasz Luba <lukasz.luba@....com>,
Valentin Schneider <valentin.schneider@....com>,
Mel Gorman <mgorman@...hsingularity.net>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: sched/core] sched/fair: Fix kernel build warning in
test_idle_cores() for !SMT NUMA
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 76c389ab2b5e300698eab87f9d4b7916f14117ba
Gitweb: https://git.kernel.org/tip/76c389ab2b5e300698eab87f9d4b7916f14117ba
Author: Valentin Schneider <valentin.schneider@....com>
AuthorDate: Tue, 03 Mar 2020 11:02:57
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 06 Mar 2020 12:57:22 +01:00
sched/fair: Fix kernel build warning in test_idle_cores() for !SMT NUMA
Building against the tip/sched/core 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]
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().
Reported-by: Anshuman Khandual <anshuman.khandual@....com>
Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@....com>
[mgorman@...hsingularity.net: Edit changelog, minor style change]
Signed-off-by: Valentin Schneider <valentin.schneider@....com>
Signed-off-by: Mel Gorman <mgorman@...hsingularity.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Fixes: ff7db0bf24db ("sched/numa: Prefer using an idle CPU as a migration target instead of comparing tasks")
Link: https://lkml.kernel.org/r/20200303110258.1092-3-mgorman@techsingularity.net
---
kernel/sched/fair.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 79bb423..bba9452 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1533,9 +1533,6 @@ static inline bool is_core_idle(int cpu)
return true;
}
-/* Forward declarations of select_idle_sibling helpers */
-static inline bool test_idle_cores(int cpu, bool def);
-
struct task_numa_env {
struct task_struct *p;
@@ -1571,9 +1568,11 @@ numa_type numa_classify(unsigned int imbalance_pct,
return node_fully_busy;
}
+#ifdef CONFIG_SCHED_SMT
+/* Forward declarations of select_idle_sibling helpers */
+static inline bool test_idle_cores(int cpu, bool def);
static inline int numa_idle_core(int idle_core, int cpu)
{
-#ifdef CONFIG_SCHED_SMT
if (!static_branch_likely(&sched_smt_present) ||
idle_core >= 0 || !test_idle_cores(cpu, false))
return idle_core;
@@ -1584,10 +1583,15 @@ static inline int numa_idle_core(int idle_core, int cpu)
*/
if (is_core_idle(cpu))
idle_core = cpu;
-#endif
return idle_core;
}
+#else
+static inline int numa_idle_core(int idle_core, int cpu)
+{
+ return idle_core;
+}
+#endif
/*
* Gather all necessary information to make NUMA balancing placement
Powered by blists - more mailing lists