HMP: Drop "sched: Fix sleep time double accounting in enqueue entity"
authorMark Brown <broonie@linaro.org>
Wed, 22 Jan 2014 11:18:53 +0000 (11:18 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 22 Jan 2014 12:26:27 +0000 (12:26 +0000)
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>
kernel/sched/fair.c

index b1e9def76b555d668e6ec8517228e39e0f5959b9..8a4a02740f0a9cb4a0f8c54c74673bfbf001b7f9 100644 (file)
@@ -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 */