From 1473e2098c3f1710fbcad9c6c6e4c834ff87de86 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 31 Jan 2020 11:26:15 +0000 Subject: [PATCH] Revert "ANDROID: sched/fair: EAS: Add uclamp support to find_energy_efficient_cpu()" This reverts commit b61876ed122f816660fe49e0de1b7ee4891deaa2. There is a better alternative upstream now, so let's drop the android specific version. Bug: 120440300 Signed-off-by: Quentin Perret Change-Id: I311c528c9f342035ef9da6a3833004f942daef00 --- kernel/sched/fair.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 49f5d8cfc208..a53cec1c9fa4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6035,19 +6035,6 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) return target; } -static unsigned int uclamp_task_util(struct task_struct *p) -{ -#ifdef CONFIG_UCLAMP_TASK - unsigned int min_util = uclamp_eff_value(p, UCLAMP_MIN); - unsigned int max_util = uclamp_eff_value(p, UCLAMP_MAX); - unsigned int est_util = task_util_est(p); - - return clamp(est_util, min_util, max_util); -#else - return task_util_est(p); -#endif -} - /** * Amount of capacity of a CPU that is (estimated to be) used by CFS tasks * @cpu: the CPU to get the utilization of @@ -6408,10 +6395,6 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy if (!fits_capacity(util, cpu_cap)) continue; - /* Skip CPUs which do not fit task requirements */ - if (cpu_cap < uclamp_task_util(p)) - continue; - /* Always use prev_cpu as a candidate. */ if (!latency_sensitive && cpu == prev_cpu) { prev_delta = compute_energy(p, prev_cpu, pd);