sched/walt: Improve the scheduler

This change is for general scheduler improvement.

Change-Id: I4d860d155697178feaed9c6418bf9fa1f773180c
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Kishore Sri venkata Ganesh Bolisetty 2020-08-10 22:58:18 -07:00
commit fe35672a0f

View file

@ -8197,6 +8197,27 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
return 0;
}
#ifdef CONFIG_SCHED_WALT
if ((env->idle == CPU_NEWLY_IDLE) &&
is_min_capacity_cpu(env->dst_cpu) &&
!is_min_capacity_cpu(env->src_cpu) &&
walt_get_rtg_status(p)) {
bool pull_to_silver_allowed = false;
unsigned int cpu;
for_each_cpu(cpu, env->cpus) {
if (!is_min_capacity_cpu(cpu) &&
cpu_overutilized(cpu)) {
pull_to_silver_allowed = true;
break;
}
}
if (!pull_to_silver_allowed)
return 0;
}
#endif
/*
* Aggressive migration if:
* 1) IDLE or NEWLY_IDLE balance.