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

Commit ee8cf2ef authored by Lingutla Chandrasekhar's avatar Lingutla Chandrasekhar
Browse files

sched: avoid energy evaluation for isolated prev_cpu



If task placement algorithm is not able to find efficient cpu,
it bias towards prev_cpu. If prev_cpu is isolated then, we use one
of non-isolated task allowed cpu and skip energy evaluations.
If we find efficient or backup cpu, prev_cpu is isolated then still it
is used for energy evaluations, which is not needed.

If prev_cpu isolated, set eenv flag independent of target_cpu to avoid
unnecessary energy evaluations.

Change-Id: I884d0e224b2f40157ef55fd429e138cf66eb6de1
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 75a3c4ec
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -7282,10 +7282,10 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
		!(p->state == TASK_RUNNING && !idle_cpu(most_spare_cap_cpu)))
		target_cpu = most_spare_cap_cpu;

	if (target_cpu == -1 && cpu_isolated(prev_cpu) &&
			isolated_candidate != -1) {
		target_cpu = isolated_candidate;
	if (cpu_isolated(prev_cpu)) {
		fbt_env->avoid_prev_cpu = true;
		if (target_cpu == -1 && isolated_candidate != -1)
			target_cpu = isolated_candidate;
	}

	/*