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

Commit b547ec33 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/fair: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: I19ec68fe40d931b501ea84a9306d04fcb58db60d
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 122f4cad
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6563,11 +6563,12 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
	unsigned int target_nr_rtg_high_prio = UINT_MAX;
	bool rtg_high_prio_task = task_rtg_high_prio(p);
	cpumask_t visit_cpus;
	bool io_task_pack = (order_index > 0 && p->in_iowait);

	/* Find start CPU based on boost value */
	start_cpu = fbt_env->start_cpu;

	if (fbt_env->strict_max)
	if (fbt_env->strict_max || io_task_pack)
		target_max_spare_cap = LONG_MIN;

	if (p->state == TASK_RUNNING)
@@ -6653,7 +6654,8 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
			 * than the one required to boost the task.
			 */
			new_util = max(min_util, new_util);
			if (!fbt_env->strict_max && new_util > capacity_orig)
			if (!(fbt_env->strict_max || io_task_pack) &&
					new_util > capacity_orig)
				continue;

			/*
@@ -8135,6 +8137,10 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
	if (!can_migrate_boosted_task(p, env->src_cpu, env->dst_cpu))
		return 0;

	if (p->in_iowait && is_min_capacity_cpu(env->dst_cpu) &&
			!is_min_capacity_cpu(env->src_cpu))
		return 0;

	if (!cpumask_test_cpu(env->dst_cpu, p->cpus_ptr)) {
		int cpu;