From ce3ecd63bf9d1e7a32788c7d647ea7b3ecab30f0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Jun 2023 11:17:22 +0000 Subject: [PATCH] Revert "sched/fair: Consider capacity inversion in util_fits_cpu()" This reverts commit 09129798a608eee34c0e53e5cb4974023628944f. It breaks the Android kernel abi, so revert it. If it needs to come back later, it can do so in an abi-safe way. Bug: 161946584 Cc: Qais Yousef Change-Id: Ied83e33a14ff0e09f5f9f288d4e779d8175a8f0f Signed-off-by: Greg Kroah-Hartman --- kernel/sched/fair.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 074d8f5b655b..a6f8251089f2 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4128,16 +4128,12 @@ static inline int util_fits_cpu(unsigned long util, * For uclamp_max, we can tolerate a drop in performance level as the * goal is to cap the task. So it's okay if it's getting less. * - * In case of capacity inversion we should honour the inverted capacity - * for both uclamp_min and uclamp_max all the time. + * In case of capacity inversion, which is not handled yet, we should + * honour the inverted capacity for both uclamp_min and uclamp_max all + * the time. */ - capacity_orig = cpu_in_capacity_inversion(cpu); - if (capacity_orig) { - capacity_orig_thermal = capacity_orig; - } else { - capacity_orig = capacity_orig_of(cpu); - capacity_orig_thermal = capacity_orig - arch_scale_thermal_pressure(cpu); - } + capacity_orig = capacity_orig_of(cpu); + capacity_orig_thermal = capacity_orig - arch_scale_thermal_pressure(cpu); /* * We want to force a task to fit a cpu as implied by uclamp_max.