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

Commit a7bc0926 authored by Olav Haugan's avatar Olav Haugan
Browse files

sched: Avoid migrating tasks to little cores due to EA



If during the check whether migration is needed we find that there is a
lower power CPU available we commence to find a new CPU for this task.
However, by the time we search for a new CPU the lower power CPU might
no longer be available. We should abort the attempt to migrate a task in
this case.

CRs-Fixed: 764788
Change-Id: I867923a82b95c599278b81cd73bb102b6aff4d03
Signed-off-by: default avatarOlav Haugan <ohaugan@codeaurora.org>
parent 2c320f2f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1860,6 +1860,10 @@ static int skip_cpu(struct task_struct *p, int cpu, int reason)
		skip = (rq->capacity >= task_rq->capacity);
		break;

	case MOVE_TO_POWER_EFFICIENT_CPU:
		skip = rq->capacity < task_rq->capacity  ||
			power_cost(p, cpu) >  power_cost(p,  task_cpu(p));
		break;
	default:
		skip = (cpu == task_cpu(p));
		break;