summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorBrendan Jackman <brendan.jackman@arm.com>2017-06-29 17:29:31 +0100
committerChris Redpath <chris.redpath@arm.com>2017-07-25 16:31:00 +0100
commitd96e40472807e08d8352d22c0d3b0ce142893c53 (patch)
tree59ac401a9b6c98d6a93716b7b778600cd35fbff3 /kernel
parente76348ec5f7f4e37f827cfcee2ead8c1089912c4 (diff)
sched/fair: Sync task util before EAS wakeup
Before using a task's util_avg signal in EAS, we need to ensure that it has been synced up to the last_update_time of prev_cpu's root cfs_rq. We previously relied on the side effect of wake_cap to do that, however that does not happen when the waking CPU has the same capacity as the prev_cpu. Therefore just explicitly call sync_entity_load_avg. This may result in calling that function twice within the same select_task_rq_fair, but since last_update_time hasn't changed the second call will bail out very quickly. Change-Id: I91f1fcd71dfeb96b7f5b73418f1cf9ac311d4655 Signed-off-by: Brendan Jackman <brendan.jackman@arm.com> Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 04eb6c66a78b..cd72ce142974 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6501,6 +6501,8 @@ static int select_energy_cpu_brute(struct task_struct *p, int prev_cpu, int sync
prefer_idle = 0;
#endif
+ sync_entity_load_avg(&p->se);
+
sd = rcu_dereference(per_cpu(sd_ea, prev_cpu));
/* Find a cpu with sufficient capacity */
tmp_target = find_best_target(p, boosted, prefer_idle);