Re: [PATCH v6 1/4] sched/fair: Fix attaching task sched avgs twice when switching to fair or changing task group
From: Vincent Guittot
Date: Thu Jun 16 2016 - 15:01:22 EST
On 16 June 2016 at 20:51, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Thu, Jun 16, 2016 at 06:30:13PM +0200, Vincent Guittot wrote:
>> With patch [1] for the init of cfs_rq side, all use cases will be
>> covered regarding the issue linked to a last_update_time set to 0 at
>> init
>> [1] https://lkml.org/lkml/2016/5/30/508
>
> Aah, wait, now I get it :-)
>
> Still, we should put cfs_rq_clock_task(cfs_rq) in it, not 1. And since
> we now acquire rq->lock on init this should well be possible. Lemme sort
> that.
yes with the rq->lock we can use cfs_rq_clock_task which is make more
sense than 1.
But the delta can be still significant between the creation of the
task group and the 1st task that will be attach to the cfs_rq