From a112baf5fb3f427b7074193283e3ff5137d3e9dd Mon Sep 17 00:00:00 2001 From: Abhijeet Dharmapurikar Date: Wed, 22 Jun 2022 13:19:55 -0700 Subject: [PATCH] sched/walt: help farthest cluster under rotation When rotation is enabled, the system is under heavy load, allow farthest cluster to help each other. Change-Id: Idd402fa120baa47e8506d7dc2439765dd6d5bcc9 Signed-off-by: Abhijeet Dharmapurikar --- kernel/sched/walt/walt_lb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/sched/walt/walt_lb.c b/kernel/sched/walt/walt_lb.c index ff89294cdc7e..b69f40fcd0f2 100644 --- a/kernel/sched/walt/walt_lb.c +++ b/kernel/sched/walt/walt_lb.c @@ -872,10 +872,11 @@ static void walt_newidle_balance(void *unused, struct rq *this_rq, if (busy_cpu != -1) { first_idle = find_first_idle_if_others_are_busy(&cpu_array[order_index][1]); - if (first_idle != -1) + if (first_idle != -1) { walt_kick_cpu(first_idle); - else + } else if (walt_rotation_enabled) { goto found_busy_cpu; + } } } else if (order_index == 2) { busy_cpu = walt_lb_find_busiest_cpu(this_cpu, &cpu_array[order_index][0], @@ -896,7 +897,11 @@ static void walt_newidle_balance(void *unused, struct rq *this_rq, if (busy_cpu != -1) { first_idle = find_first_idle_if_others_are_busy(&cpu_array[order_index][1]); - walt_kick_cpu(first_idle); + if (first_idle != -1) { + walt_kick_cpu(first_idle); + } else if (walt_rotation_enabled) { + goto found_busy_cpu; + } } } else { busy_cpu =