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

Commit 31f07c0c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Improve the scheduler"

parents 05d1e38b b547ec33
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6564,11 +6564,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)
@@ -6654,7 +6655,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;

			/*
@@ -8136,6 +8138,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;