aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2015-08-04 17:17:23 +0100
committerJuri Lelli <juri.lelli@arm.com>2015-10-05 12:10:04 +0100
commitb68d8d477a9797196e2a91f763df17f849535ffe (patch)
tree08f9455cc511c037fabec9daba424e9d03012149
parentd0cfe4a7fe1f81765dfa9d849851f7004050512b (diff)
downloadlinux-linaro-stable-b68d8d477a9797196e2a91f763df17f849535ffe.tar.gz
WIP: sched: Do eas idle balance regardless of the rq avg idle value
EAS relies on idle balance to migrate a misfit task towards a cpu with higher capacity. When such a cpu becomes idle, idle balance should happen even if the rq avg idle is smaller than the sched migration cost (default 500us). The rq avg idle is updated during the wakeup of a task in case the rq has a non-null idle_stamp. This value stays unchanged and valid until the next task wakes up on this cpu after an idle period. So rq avg idle could be smaller than sched migration cost preventing the idle balance from happening. In this case we would be at the mercy of wakeup, periodic or nohz-idle load balancing to put another task on this cpu. To break this dependency towards rq avg idle make EAS idle balance independent from this rq avg idle has to be larger than sched migration cost. Change-Id: I880a25180062444d72947461d976dc44f9672f13 Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rw-r--r--kernel/sched/fair.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a4cdc1026795..82dee12f2f01 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7583,8 +7583,8 @@ static int idle_balance(struct rq *this_rq)
*/
this_rq->idle_stamp = rq_clock(this_rq);
- if (this_rq->avg_idle < sysctl_sched_migration_cost ||
- (!energy_aware() && !this_rq->rd->overload) ||
+ if ((!energy_aware() && (this_rq->avg_idle < sysctl_sched_migration_cost
+ || !this_rq->rd->overload)) ||
(energy_aware() && !this_rq->rd->overutilized)) {
rcu_read_lock();
sd = rcu_dereference_check_sched_domain(this_rq->sd);