[tip:sched/core] sched: Avoid expensive initial update_cfs_load(), on UP too

From: tip-bot for Peter Zijlstra
Date: Thu Jan 27 2011 - 06:59:11 EST


Commit-ID: 6ea72f12069306b235151c5b05ac0cca7e1dedfa
Gitweb: http://git.kernel.org/tip/6ea72f12069306b235151c5b05ac0cca7e1dedfa
Author: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
AuthorDate: Wed, 26 Jan 2011 13:36:03 +0100
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Thu, 27 Jan 2011 12:48:14 +0100

sched: Avoid expensive initial update_cfs_load(), on UP too

Fix the build on UP.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Paul Turner <pjt@xxxxxxxxxx>
LKML-Reference: <20110122044852.102126037@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/sched.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 78fa753..477e1bc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7922,8 +7922,10 @@ static void init_cfs_rq(struct cfs_rq *cfs_rq, struct rq *rq)
#ifdef CONFIG_FAIR_GROUP_SCHED
cfs_rq->rq = rq;
/* allow initial update_cfs_load() to truncate */
+#ifdef CONFIG_SMP
cfs_rq->load_stamp = 1;
#endif
+#endif
cfs_rq->min_vruntime = (u64)(-(1LL << 20));
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/