From 22b04fa8056494bbaa43a218635162b338aeb15f Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Fri, 17 Apr 2020 09:23:40 -0700 Subject: [PATCH] sched/fair: honor uclamp restrictions in fbt() While calculating untilization of CPU during task placement in fbt(), current code doesn't take uclamp into account which would lead to selection of incorrect CPU for the task when uclamp restrictions are in place for the task. Change-Id: I8371affe3b37733d222e5c57953e53f91fc19a53 Signed-off-by: Satya Durga Srinivasu Prabhala --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4c0efb85cf44..31faa0dfff3c 100755 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6616,7 +6616,7 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus, * accounting. However, the blocked utilization may be zero. */ wake_util = cpu_util_without(i, p); - new_util = wake_util + task_util_est(p); + new_util = wake_util + uclamp_task_util(p); spare_wake_cap = capacity_orig - wake_util; if (spare_wake_cap > most_spare_wake_cap) {