From 114ae28faaf55ef78b68740243f18eee1996c07d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 27 Apr 2023 11:05:53 +0000 Subject: [PATCH] Revert "sched/fair: Consider capacity inversion in util_fits_cpu()" This reverts commit 98762616db0ba9d2f9c3a8a95dbb7405597b55f4. It breaks the current Android kernel abi. It will be brought back at the next KABI break update. Bug: 161946584 Change-Id: I4ed9d6760b8d2e26bad66d9af39d7819e7b464d9 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 fd3d1f7edd0c..6c55f7daa3da 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4180,16 +4180,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.