Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-03 Thread Peter Zijlstra
On Wed, Jun 03, 2015 at 01:42:41PM +0300, Kirill Tkhai wrote: > [resend] > > 03.06.2015, 10:32, "Peter Zijlstra" : > > On Tue, Jun 02, 2015 at 07:27:19PM +0300, Kirill Tkhai wrote: > >>>  + * task_dead_dl() will cancel our timer if we happen to die while > >>>  + * its still pending. > >>  task_de

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-03 Thread Kirill Tkhai
[resend] 03.06.2015, 10:32, "Peter Zijlstra" : > On Tue, Jun 02, 2015 at 07:27:19PM +0300, Kirill Tkhai wrote: >>>  + * task_dead_dl() will cancel our timer if we happen to die while >>>  + * its still pending. >>  task_dead_dl() is called for tasks of deadline class only. So if we do that, >>  th

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-03 Thread Kirill Tkhai
В Ср, 03/06/2015 в 09:32 +0200, Peter Zijlstra пишет: > On Tue, Jun 02, 2015 at 07:27:19PM +0300, Kirill Tkhai wrote: > > > + * task_dead_dl() will cancel our timer if we happen to die while > > > + * its still pending. > > > > task_dead_dl() is called for tasks of deadline class only. So if we

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-03 Thread Peter Zijlstra
On Tue, Jun 02, 2015 at 07:27:19PM +0300, Kirill Tkhai wrote: > > +* task_dead_dl() will cancel our timer if we happen to die while > > +* its still pending. > > task_dead_dl() is called for tasks of deadline class only. So if we do that, > the timer may be executed after final task's dead

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-02 Thread Kirill Tkhai
В Вт, 02/06/2015 в 18:07 +0200, Peter Zijlstra пишет: On Tue, Jun 02, 2015 at 04:27:10PM +0200, Peter Zijlstra wrote: > > On Tue, 2015-06-02 at 16:58 +0300, Kirill Tkhai wrote: > > > 01.06.2015, 17:13, "Peter Zijlstra" : > > > > > > @@ -1010,7 +1014,7 @@ static inline void check_class_changed(s >

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-02 Thread Peter Zijlstra
On Tue, Jun 02, 2015 at 04:27:10PM +0200, Peter Zijlstra wrote: > On Tue, 2015-06-02 at 16:58 +0300, Kirill Tkhai wrote: > > 01.06.2015, 17:13, "Peter Zijlstra" : > > > > @@ -1010,7 +1014,7 @@ static inline void check_class_changed(s > > > if (prev_class != p->sched_class) { > > >

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-02 Thread Peter Zijlstra
On Tue, 2015-06-02 at 16:58 +0300, Kirill Tkhai wrote: > 01.06.2015, 17:13, "Peter Zijlstra" : > > @@ -1010,7 +1014,7 @@ static inline void check_class_changed(s > > if (prev_class != p->sched_class) { > > if (prev_class->switched_from) > > prev_c

Re: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()

2015-06-02 Thread Kirill Tkhai
01.06.2015, 17:13, "Peter Zijlstra" : > In order to remove dropping rq->lock from the > switched_{to,from}()/prio_changed() sched_class methods, run the > balance callbacks after it. > > We need to remove dropping rq->lock because its buggy, > suppose using sched_setattr()/sched_setscheduler() to c