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 {