From 04f5df4cba3706965cfb9de7ec776723679f6240 Mon Sep 17 00:00:00 2001 From: Abhijeet Dharmapurikar Date: Tue, 4 May 2021 12:26:03 -0700 Subject: [PATCH] sched/walt: handle overlap between silver and gold When a task is being placed on silver and is not a filtered task and is not a small task, look for a gold for this task. Change-Id: Ic6f5a047e4f25c66f4b7be1f0b48ca49a2c5aa50 Signed-off-by: Abhijeet Dharmapurikar --- kernel/sched/walt/walt_cfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/sched/walt/walt_cfs.c b/kernel/sched/walt/walt_cfs.c index baf038bf6c57..ed6072969eaa 100644 --- a/kernel/sched/walt/walt_cfs.c +++ b/kernel/sched/walt/walt_cfs.c @@ -113,6 +113,7 @@ static inline bool walt_target_ok(int target_cpu, int order_index) (target_cpu == cpumask_first(&cpu_array[order_index][0]))); } +#define MIN_UTIL_FOR_ENERGY_EVAL 10 static void walt_get_indicies(struct task_struct *p, int *order_index, int *end_index, int task_boost, bool uclamp_boost) { @@ -148,6 +149,13 @@ static void walt_get_indicies(struct task_struct *p, int *order_index, } *order_index = i; + + if (*order_index == 0 && + (task_util(p) >= MIN_UTIL_FOR_ENERGY_EVAL) && + !walt_get_rtg_status(p) && + !(sched_boost_type == CONSERVATIVE_BOOST && task_sched_boost(p)) + ) + *end_index = 1; } enum fastpaths {