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

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

Merge "sched/fair: Improve the scheduler"

parents dc616ade 2381da12
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -6954,7 +6954,7 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
	if (prefer_idle && boosted)
		target_capacity = 0;

	if (fbt_env->strict_max)
	if (fbt_env->strict_max || p->in_iowait)
		most_spare_wake_cap = LONG_MIN;

	/* Find start CPU based on boost value */
@@ -7271,6 +7271,10 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
		next_group_higher_cap = (capacity_orig_of(group_first_cpu(sg)) <
			capacity_orig_of(group_first_cpu(sg->next)));

		if (p->in_iowait && !next_group_higher_cap &&
				most_spare_cap_cpu != -1)
			break;

		/*
		 * If we've found a cpu, but the boost is ON_ALL we continue
		 * visiting other clusters. If the boost is ON_BIG we visit
@@ -8717,6 +8721,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_allowed)) {
		int cpu;