aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-15 17:00:04 +0200
committerIngo Molnar <mingo@elte.hu>2007-10-15 17:00:04 +0200
commit6cb58195143b55d4c427d92f8425bec2b0d9c56c (patch)
tree80727312684fe2be27c2c6202a42fff1915f9599 /kernel/sched.c
parentbf5c91ba8c629b84413c761f529627195fd0a935 (diff)
sched: optimize vruntime based scheduling
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index a5dd03522e3..5594e65166f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
}