Re: [PATCH v5 3/7] sched: set initial value of runnable avg for newforked task

From: Alex Shi
Date: Thu May 09 2013 - 09:14:01 EST


On 05/09/2013 05:24 PM, Paul Turner wrote:
>> >
>> > +#ifdef CONFIG_SMP
>> > +void set_task_runnable_avg(struct task_struct *p)
>> > +{
>> > + u64 slice;
>> > +
>> > + slice = sched_slice(task_cfs_rq(p), &p->se);
>> > + p->se.avg.runnable_avg_sum = slice;
>> > + p->se.avg.runnable_avg_period = slice;
> This needs to be >> 10 right? sched_slice is in ns.

Yes, I omitted this.
>
> We also still want to set load_avg_contrib right?

yes, and seem set it here seems better. :)
>


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