lkml.org 
[lkml]   [2013]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 11/22] sched: consider runnable load average in effective_load
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


\
 
 \ /
  Last update: 2013-01-16 07:01    [W:0.104 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site