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

Commit ee198063 authored by Satya Durga Srinivasu Prabhala's avatar Satya Durga Srinivasu Prabhala
Browse files

sched/fair: Always try to find energy efficient CPU in wakeup path



Right now, if rd is overutilized, we bail out from
find_energy_efficient_cpu(). Instead, always try to find  energy
efficient CPU to be more energy efficient. While at it use
sd_asym_cpucapacity find start_sd in find_best_target() instead of
sd_asym_packing.

Change-Id: I3b2e953aff2ff70da59f735a1c20c14f0ba17ba3
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 377e49df
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6735,7 +6735,7 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
		goto out;

	/* Find SD for the start CPU */
	start_sd = rcu_dereference(per_cpu(sd_asym_packing, start_cpu));
	start_sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, start_cpu));
	if (!start_sd)
		goto out;

@@ -7391,7 +7391,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy

	rcu_read_lock();
	pd = rcu_dereference(rd->pd);
	if (!pd || READ_ONCE(rd->overutilized))
	if (!pd)
		goto fail;

	/*