On 01/14/2013 08:01 PM, Morten Rasmussen wrote:
>>>>  static long effective_load(struct task_group *tg, int cpu, long wl, long 
>>>> wg)
>>>> > >>  {
>>>> > >>       struct sched_entity *se = tg->se[cpu];
>>>> > >>  
>>>> > >>       if (!tg->parent)        /* the trivial, non-cgroup case */
>>>> > >> -             return wl;
>>>> > >> +             return wl * tg->cfs_rq[cpu]->tg_runnable_contrib
>>>> > >> +                                             >> NICE_0_SHIFT;
>>> > > 
>>> > > Why do we need to scale the load of the task (wl) by runnable_contrib
>>> > > when the task is in the root task group? Wouldn't the load change still
>>> > > just be wl?
>>> > > 
>> > 
>> > Here, wl is the load weight, runnable_contrib engaged the runnable time.
> Yes, wl is the load weight of the task. But I don't understand why you
> multiply it with the tg_runnable_contrib of the group you want to insert
> it into. Since effective_load() is supposed to return the load change
> caused by adding the task to the cpu it would make more sense if you
> multiplied with the task runnable_avg_sum / runnable_avg_period of the
> task in question.
> 

I was consider the task will follow the cpu's runnable time, like
throttle etc.
But may it is a bit early to consider this. use the task's runnable avg
seems better.

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

Reply via email to