summaryrefslogtreecommitdiff
path: root/kernel/sched/hmp.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2016-04-13 15:13:56 +0530
committerPavankumar Kondeti <pkondeti@codeaurora.org>2017-02-15 08:48:17 +0530
commitab05391aa67a92f2e06ad754606e7139de7f684b (patch)
tree007fad51de026902ee92d274db818d69b4dc4435 /kernel/sched/hmp.c
parentb1c40e1868d76411e343452427eb4ca60b405f81 (diff)
sched: don't assume higher capacity means higher power in tick migration
When an upmigrate ineligible task running on the maximum capacity CPU, we check if it can be migrated to a lower capacity CPU in tick path. Add a power cost based check there to prevent the task migration from a power efficient CPU. Change-Id: I291c62d7dbf169d5123faba5f5246ad44a7a40dd Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel/sched/hmp.c')
-rw-r--r--kernel/sched/hmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index 6379de764236..1b6fe3d31b64 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -455,6 +455,12 @@ compare_clusters(void *priv, struct list_head *a, struct list_head *b)
cluster1 = container_of(a, struct sched_cluster, list);
cluster2 = container_of(b, struct sched_cluster, list);
+ /*
+ * Don't assume higher capacity means higher power. If the
+ * power cost is same, sort the higher capacity cluster before
+ * the lower capacity cluster to start placing the tasks
+ * on the higher capacity cluster.
+ */
ret = cluster1->max_power_cost > cluster2->max_power_cost ||
(cluster1->max_power_cost == cluster2->max_power_cost &&
cluster1->max_possible_capacity <