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

From: Peter Zijlstra
Date: Wed Jan 26 2011 - 07:35:34 EST


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));
}


--
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/