]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: fix normalized sleeper
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 5 May 2008 21:56:17 +0000 (23:56 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 May 2008 21:56:17 +0000 (23:56 +0200)
Normalized sleeper uses calc_delta*() which requires that the rq load is
already updated, so move account_entity_enqueue() before place_entity()

Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index 89fa32b4edf27d500c3d6c644596ffc4afb881f5..1295ddc5656b13d423a712cdfe86ee01d6ccf1af 100644 (file)
@@ -682,6 +682,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup)
         * Update run-time statistics of the 'current'.
         */
        update_curr(cfs_rq);
+       account_entity_enqueue(cfs_rq, se);
 
        if (wakeup) {
                place_entity(cfs_rq, se, 0);
@@ -692,7 +693,6 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup)
        check_spread(cfs_rq, se);
        if (se != cfs_rq->curr)
                __enqueue_entity(cfs_rq, se);
-       account_entity_enqueue(cfs_rq, se);
 }
 
 static void update_avg(u64 *avg, u64 sample)