Re: [PATCH v3] sched: fix first task of a task group is attached twice

From: Vincent Guittot
Date: Thu Jun 16 2016 - 05:42:38 EST


On 16 June 2016 at 01:24, Yuyang Du <yuyang.du@xxxxxxxxx> wrote:
> On Thu, Jun 16, 2016 at 09:12:58AM +0200, Vincent Guittot wrote:
>> > Then, when enqueued, both cfs_rq and task will be decayed to 0, due to
>> > a large gap between 1 and now, no?
>>
>> yes, like it is done currently (but 1ns later) .
>
> Well, currently, cfs_rq will be decayed to 0, but will then add the task.
> So it turns out the current result is right. Attached twice, but result
> is right. Correct?

So the load looks accidentally correct but not the utilization which
will be overestimated up to twice the max

With this change,the behavior of the 1st task becomes the same as what
happen to the other tasks that will be attached to the task group that
has been idle for a while and that has an old last_update_time.
Then, i have other pending patch to fix this behavior, has mentioned
in a previous email