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

Commit ff24bea2 authored by Biao Long's avatar Biao Long Committed by Gerrit - the friendly Code Review server
Browse files

sched/fair: Don't place wakee on waker cpu if colocate enabled



If both wakee and waker are in top-app,don't place wakee on waker
cpu, because most of this case waker is not going to sleep,this
will cause waker preempted and lead high runnable time,so let
scheduler to select the best cpu in this case.

Change-Id: If6eb3c0acb202197e9dd90205c581398ac049649
Signed-off-by: default avatarBiao Long <blong@codeaurora.org>
parent b27b7814
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -7619,7 +7619,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
	struct perf_domain *pd;
	struct sched_domain *sd;
	cpumask_t *candidates;
	bool is_rtg;
	bool is_rtg, curr_is_rtg;
	struct find_best_target_env fbt_env;
	bool need_idle = wake_to_idle(p);
	int placement_boost = task_boost_policy(p);
@@ -7633,6 +7633,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
		goto eas_not_ready;

	is_rtg = task_in_related_thread_group(p);
	curr_is_rtg = task_in_related_thread_group(cpu_rq(cpu)->curr);

	fbt_env.fastpath = 0;

@@ -7643,7 +7644,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
	candidates = this_cpu_ptr(&energy_cpus);
	cpumask_clear(candidates);

	if (need_idle)
	if (sync && (need_idle || (is_rtg && curr_is_rtg)))
		sync = 0;

	if (sysctl_sched_sync_hint_enable && sync &&