diff options
authorMark Brown <broonie@linaro.org>2014-01-22 11:18:53 +0000
committerMark Brown <broonie@linaro.org>2014-01-22 12:26:27 +0000
commit0e9b1909c3c660060d94a0a8a15c5299de97a4aa (patch)
parent916ff46934c350d6dee3c02da62950539559922c (diff)
HMP: Drop "sched: Fix sleep time double accounting in enqueue entity"
This reverts commit f0862cb749c537c32de82912d30110098ddc6cd6. Analysis from Vincent Guittot: With the current implementation, the load average statistics of a sched entity change according to other activity on the CPU even if this activity is done between the running window of the sched entity and have no influence on the running duration of the task. When a task wakes up on the same CPU, we currently update last_runnable_update with the return of __synchronize_entity_decay without updating the runnable_avg_sum and runnable_avg_period accordingly. In fact, we have to sync the load_contrib of the se with the rq's blocked_load_contrib before removing it from the latter (with __synchronize_entity_decay) but we must keep last_runnable_update unchanged for updating runnable_avg_sum/period during the next update_entity_load_avg. Signed-off-by: Mark Brown <broonie@linaro.org>
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b1e9def76b5..8a4a02740f0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1714,13 +1714,7 @@ static inline void enqueue_entity_load_avg(struct cfs_rq *cfs_rq,
wakeup = 0;
} else {
- /*
- * Task re-woke on same cpu (or else migrate_task_rq_fair()
- * would have made count negative); we must be careful to avoid
- * double-accounting blocked time after synchronizing decays.
- */
- se->avg.last_runnable_update += __synchronize_entity_decay(se)
- << 20;
+ __synchronize_entity_decay(se);
/* migrated tasks did not contribute to our blocked load */