[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50F63AE8.8090908@intel.com>
Date: Wed, 16 Jan 2013 13:30:16 +0800
From: Alex Shi <alex.shi@...el.com>
To: Morten Rasmussen <Morten.Rasmussen@....com>
CC: "mingo@...hat.com" <mingo@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"bp@...en8.de" <bp@...en8.de>, "pjt@...gle.com" <pjt@...gle.com>,
"namhyung@...nel.org" <namhyung@...nel.org>,
"efault@....de" <efault@....de>,
"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists