Re: [patch v6 3/8] sched: set initial value of runnable avg for newforked task

From: Alex Shi
Date: Thu May 16 2013 - 02:29:01 EST


On 05/10/2013 11:17 PM, Alex Shi wrote:
> We need initialize the se.avg.{decay_count, load_avg_contrib} for a
> new forked task.
> Otherwise random values of above variables cause mess when do new task
> enqueue:
> enqueue_task_fair
> enqueue_entity
> enqueue_entity_load_avg
>
> and make forking balancing imbalance since incorrect load_avg_contrib.
>
> Further more, Morten Rasmussen notice some tasks were not launched at
> once after created. So Paul and Peter suggest giving a start value for
> new task runnable avg time same as sched_slice().
>

updated, it fits latest linus and tip/sched/core tree.