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

2016-06-16 Thread Vincent Guittot
On 16 June 2016 at 01:24, Yuyang Du 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, current

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

2016-06-16 Thread Yuyang Du
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 t

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

2016-06-16 Thread Vincent Guittot
On 15 June 2016 at 21:19, Yuyang Du wrote: > On Mon, May 30, 2016 at 05:52:20PM +0200, Vincent Guittot wrote: >> The cfs_rq->avg.last_update_time is initialize to 0 with the main effect >> that the 1st sched_entity that will be attached, will keep its >> last_update_time set to 0 and will attached

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

2016-06-15 Thread Yuyang Du
On Mon, May 30, 2016 at 05:52:20PM +0200, Vincent Guittot wrote: > The cfs_rq->avg.last_update_time is initialize to 0 with the main effect > that the 1st sched_entity that will be attached, will keep its > last_update_time set to 0 and will attached once again during the > enqueue. > Initialize cf

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

2016-06-07 Thread Vincent Guittot
Hi Dietmar, On 6 June 2016 at 21:32, Dietmar Eggemann wrote: > On 01/06/16 16:54, Vincent Guittot wrote: >> On 1 June 2016 at 17:31, Dietmar Eggemann wrote: >>> On 30/05/16 16:52, Vincent Guittot wrote: The cfs_rq->avg.last_update_time is initialize to 0 with the main effect that the 1

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

2016-06-06 Thread Dietmar Eggemann
On 01/06/16 16:54, Vincent Guittot wrote: > On 1 June 2016 at 17:31, Dietmar Eggemann wrote: >> On 30/05/16 16:52, Vincent Guittot wrote: >>> The cfs_rq->avg.last_update_time is initialize to 0 with the main effect >>> that the 1st sched_entity that will be attached, will keep its >> >> attached i

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

2016-06-01 Thread Vincent Guittot
On 1 June 2016 at 17:31, Dietmar Eggemann wrote: > On 30/05/16 16:52, Vincent Guittot wrote: >> The cfs_rq->avg.last_update_time is initialize to 0 with the main effect >> that the 1st sched_entity that will be attached, will keep its > > attached in .task_move_group ? > > I'm not sure if we can h

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

2016-06-01 Thread Dietmar Eggemann
On 30/05/16 16:52, Vincent Guittot wrote: > The cfs_rq->avg.last_update_time is initialize to 0 with the main effect > that the 1st sched_entity that will be attached, will keep its attached in .task_move_group ? I'm not sure if we can have a .switched_to() directly followed by a .enqueue_task()

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

2016-05-31 Thread Yuyang Du
On Tue, May 31, 2016 at 09:28:30AM +0200, Vincent Guittot wrote: > Hi Yuyang, > > On 30 May 2016 at 21:48, Yuyang Du wrote: > > On Mon, May 30, 2016 at 05:52:20PM +0200, Vincent Guittot wrote: > >> The cfs_rq->avg.last_update_time is initialize to 0 with the main effect > >> that the 1st sched_en

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

2016-05-31 Thread Vincent Guittot
Hi Yuyang, On 30 May 2016 at 21:48, Yuyang Du wrote: > On Mon, May 30, 2016 at 05:52:20PM +0200, Vincent Guittot wrote: >> The cfs_rq->avg.last_update_time is initialize to 0 with the main effect >> that the 1st sched_entity that will be attached, will keep its >> last_update_time set to 0 and wi

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

2016-05-30 Thread Yuyang Du
On Mon, May 30, 2016 at 05:52:20PM +0200, Vincent Guittot wrote: > The cfs_rq->avg.last_update_time is initialize to 0 with the main effect > that the 1st sched_entity that will be attached, will keep its > last_update_time set to 0 and will attached once again during the > enqueue. > Initialize cf

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

2016-05-30 Thread Vincent Guittot
The cfs_rq->avg.last_update_time is initialize to 0 with the main effect that the 1st sched_entity that will be attached, will keep its last_update_time set to 0 and will attached once again during the enqueue. Initialize cfs_rq->avg.last_update_time to 1 instead. Signed-off-by: Vincent Guittot -