]> err.no Git - linux-2.6/commitdiff
sched: optimize vruntime based scheduling
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)
optimize vruntime based scheduling.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched.c
kernel/sched_fair.c

index a5dd03522e32453da6c14bc1b821414f11687e81..5594e65166fc771d658b0073107a3977f99ed11a 100644 (file)
@@ -732,13 +732,14 @@ calc_delta_fair(unsigned long delta_exec, struct load_weight *lw)
 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
 {
        lw->weight += inc;
-       lw->inv_weight = WMULT_CONST / lw->weight;
+       if (sched_feat(FAIR_SLEEPERS))
+               lw->inv_weight = WMULT_CONST / lw->weight;
 }
 
 static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
 {
        lw->weight -= dec;
-       if (likely(lw->weight))
+       if (sched_feat(FAIR_SLEEPERS) && likely(lw->weight))
                lw->inv_weight = WMULT_CONST / lw->weight;
 }
 
index a566a4558167b13e4dcc72d255dd0520b301f7d7..7041dc697855c3b5e4a959f92ee418dfbf3ac583 100644 (file)
@@ -336,6 +336,9 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,
        }
        curr->vruntime += delta_exec_weighted;
 
+       if (!sched_feat(FAIR_SLEEPERS))
+               return;
+
        if (unlikely(!load))
                return;