Re: [tip:sched/core] sched: Avoid expensive initial update_cfs_load()

Peter Zijlstra
2011-01-26T12:35:24Z

On Wed, 2011-01-26 at 12:11 +0000, tip-bot for Paul Turner wrote:
> index e0fa3ff..6820b5b 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -7796,6 +7796,8 @@ static void init_cfs_rq(struct cfs_rq *cfs_rq,
> struct rq *rq)
> INIT_LIST_HEAD(&cfs_rq->tasks);
> #ifdef CONFIG_FAIR_GROUP_SCHED
> cfs_rq->rq = rq;
> + /* allow initial update_cfs_load() to truncate */
> + cfs_rq->load_stamp = 1;
> #endif
> cfs_rq->min_vruntime = (u64)(-(1LL << 20));
> }

That wants a fix to build on UP,

---
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -7797,8 +7797,10 @@ static void init_cfs_rq(struct cfs_rq *c
#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));
}