Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe35672a authored by Kishore Sri venkata Ganesh Bolisetty's avatar Kishore Sri venkata Ganesh Bolisetty
Browse files

sched/walt: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: I4d860d155697178feaed9c6418bf9fa1f773180c
Signed-off-by: default avatarKishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent aeafb182
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -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.