[PATCH v3 7/8] sched/fair: Remove ifdefs in waker_affine_idler_llc

From: Srikar Dronamraju
Date: Thu May 13 2021 - 03:42:32 EST


Now that idle callbacks are updating nr_busy_cpus, remove ifdefs in
wake_affine_idler_llc

Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>
Cc: Gautham R Shenoy <ego@xxxxxxxxxxxxxxxxxx>
Cc: Parth Shah <parth@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Valentin Schneider <valentin.schneider@xxxxxxx>
Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxxx>
Cc: Aubrey Li <aubrey.li@xxxxxxxxxxxxxxx>
Signed-off-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
---
kernel/sched/fair.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8f86359efdbd..1ca05176ad18 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5896,9 +5896,7 @@ static inline bool test_reset_idle_core(struct sched_domain_shared *sds, int val

static int wake_affine_idler_llc(struct task_struct *p, int pref_cpu, int try_cpu, int sync)
{
-#ifdef CONFIG_NO_HZ_COMMON
int tnr_busy, tllc_size, pnr_busy, pllc_size;
-#endif
struct sched_domain_shared *pref_sds, *try_sds;
int diff, idle_core;

@@ -5926,7 +5924,6 @@ static int wake_affine_idler_llc(struct task_struct *p, int pref_cpu, int try_cp
test_reset_idle_core(try_sds, idle_core))
return idle_core;

-#ifdef CONFIG_NO_HZ_COMMON
pnr_busy = atomic_read(&pref_sds->nr_busy_cpus);
tnr_busy = atomic_read(&try_sds->nr_busy_cpus);
pllc_size = per_cpu(sd_llc_size, pref_cpu);
@@ -5940,7 +5937,6 @@ static int wake_affine_idler_llc(struct task_struct *p, int pref_cpu, int try_cp
return pref_cpu;
if (diff < 0)
return try_cpu;
-#endif /* CONFIG_NO_HZ_COMMON */

return nr_cpumask_bits;
}
--
2.18.2