From 862319bb85e331d9d72bfdbf8008100f27b7eec7 Mon Sep 17 00:00:00 2001 From: Pavankumar Kondeti Date: Thu, 10 Dec 2020 10:22:02 +0530 Subject: [PATCH] sched/walt: Improve the scheduler This change is for general scheduler improvement. Change-Id: Id19f38a2b9a67b130876cb8df1e88c6a56aa6aad Signed-off-by: Pavankumar Kondeti --- kernel/sched/fair.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c28eb90aa50f..421bf8986b71 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6591,8 +6591,10 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, most_spare_wake_cap = LONG_MIN; } - if (fbt_env->strict_max) - target_max_spare_cap = LONG_MIN; + if (fbt_env->strict_max) { + stop_index = 0; + most_spare_wake_cap = LONG_MIN; + } if (p->state == TASK_RUNNING) most_spare_wake_cap = ULONG_MAX; @@ -6656,9 +6658,8 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, most_spare_cap_cpu = i; } - if ((per_task_boost(cpu_rq(i)->curr) == - TASK_BOOST_STRICT_MAX) && - !fbt_env->strict_max) + if (per_task_boost(cpu_rq(i)->curr) == + TASK_BOOST_STRICT_MAX) continue; /* * Cumulative demand may already be accounting for the @@ -6677,7 +6678,7 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus, * than the one required to boost the task. */ new_util = max(min_util, new_util); - if (!fbt_env->strict_max && new_util > capacity_orig) + if (new_util > capacity_orig) continue; /*