[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56705FE1.5000600@linaro.org>
Date: Tue, 15 Dec 2015 10:45:53 -0800
From: Steve Muckle <steve.muckle@...aro.org>
To: Yuyang Du <yuyang.du@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Juri Lelli <Juri.Lelli@....com>,
Vincent Guittot <vincent.guittot@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: PELT initial task load and wake_up_new_task()
On 12/14/2015 06:24 PM, Yuyang Du wrote:
>>> On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote:
>>>> In init_entity_runnable_average() the last_update_time is initialized to
>>>> zero. The task is given max load and utilization as a pessimistic
>>>> initial estimate.
>>>>
>>>> But if in wake_up_new_task() the task is placed on a CPU other than
>>>> where it was created, __update_load_avg() will be called via
>>>> set_task_cpu() -> migrate_task_rq_fair() -> remove_entity_load_avg().
>>>>
>>>> Since last_update_time is zero the delta will be huge and the task's
>>>> load will be entirely decayed away before it is enqueued at the
>>>> destination CPU.
>>>
>>> Since the new task's last_update_time is equal to 0, it will not be decayed.
>>
>> Can you point me to the code for that logic? I don't see anything that
>> prevents the decay when a newly woken task is placed on a different CPU
>> via the call chain I mentioned above. My testing also shows the load
>> being decayed to zero.
>>
> You may search the last_update_time, and see it would be treated differently
> if it is 0. Hope this may be helpful.
Are you referring to the test in enqueue_entity_load_avg()? If so that
isn't called until after remove_entity_load_avg() in this scenario,
which has no check on last_update_time.
thanks,
Steve
--
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