summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorOlav Haugan <ohaugan@codeaurora.org>2014-11-26 12:54:37 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:01:20 -0700
commitc7b587d9aa093de529b2fc6efd90b1f856a78bc7 (patch)
treede8cfbefffe172d712536440754108a92a085604 /kernel
parent5a48aeb06c504302abaec157664a6f3a6205b2cd (diff)
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: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3204ca2a9619..f0d34f818428 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3174,6 +3174,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;