Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-31 Thread Vincent Guittot
On 31 October 2017 at 16:01, Peter Zijlstra wrote: > On Tue, Oct 31, 2017 at 12:14:11PM +0100, Vincent Guittot wrote: > >> > + if (runnable_sum >= 0) { >> > + /* >> > +* Add runnable; clip at LOAD_AVG_MAX. Reflects that until >> > +* the CPU is s

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-31 Thread Peter Zijlstra
On Tue, Oct 31, 2017 at 12:14:11PM +0100, Vincent Guittot wrote: > > + if (runnable_sum >= 0) { > > + /* > > +* Add runnable; clip at LOAD_AVG_MAX. Reflects that until > > +* the CPU is saturated running == runnable. > > +*/ > > +

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-31 Thread Vincent Guittot
On 30 October 2017 at 18:20, Peter Zijlstra wrote: > So after a bit of poking I ended up with something like the below; I > think there's still a few open points, see XXX. But its better than we > have now. > > Josef, could you see if this completely wrecks your workloads? > > --- > Subject: sched

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-30 Thread Peter Zijlstra
So after a bit of poking I ended up with something like the below; I think there's still a few open points, see XXX. But its better than we have now. Josef, could you see if this completely wrecks your workloads? --- Subject: sched: Update runnable propagation rule From: Vincent Guittot Date: Th

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-30 Thread Peter Zijlstra
On Wed, Oct 18, 2017 at 01:45:25PM +0100, Morten Rasmussen wrote: > > > > + * Basically (4) but in differential form: > > > > + * > > > > + * d(runnable_avg) += se->avg.load_avg / se->load.weight > > > > + *(5) > > > > + * ge->avg.

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-19 Thread Vincent Guittot
Subject: [PATCH v2] sched: Update runnable propagation rule Unlike running, the runnable part can't be directly propagated through the hierarchy when we migrate a task. The main reason is that runnable time can be shared with other sched_entities that stay on the rq and this runnable time will als

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-18 Thread Morten Rasmussen
On Mon, Oct 09, 2017 at 11:45:17AM +0200, Peter Zijlstra wrote: > On Mon, Oct 09, 2017 at 09:08:57AM +0100, Morten Rasmussen wrote: > > > --- a/kernel/sched/debug.c > > > +++ b/kernel/sched/debug.c > > > @@ -565,6 +565,8 @@ void print_cfs_rq(struct seq_file *m, in > > > cfs_rq->re

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-16 Thread Vincent Guittot
Hi Peter, Le Friday 13 Oct 2017 à 22:41:11 (+0200), Peter Zijlstra a écrit : > On Fri, Oct 13, 2017 at 05:22:54PM +0200, Vincent Guittot wrote: > > > > I have studied a bit more how to improve the propagation formula and the > > changes below is doing the job for the UCs that I have tested. > >

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-15 Thread Vincent Guittot
On 13 October 2017 at 22:41, Peter Zijlstra wrote: > On Fri, Oct 13, 2017 at 05:22:54PM +0200, Vincent Guittot wrote: >> >> I have studied a bit more how to improve the propagation formula and the >> changes below is doing the job for the UCs that I have tested. >> >> Unlike running, we can't dire

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-13 Thread Peter Zijlstra
On Fri, Oct 13, 2017 at 05:22:54PM +0200, Vincent Guittot wrote: > > I have studied a bit more how to improve the propagation formula and the > changes below is doing the job for the UCs that I have tested. > > Unlike running, we can't directly propagate the runnable through hierarchy > when we m

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-13 Thread Vincent Guittot
Hi Peter, Le Tuesday 10 Oct 2017 à 09:44:53 (+0200), Vincent Guittot a écrit : > On 10 October 2017 at 09:29, Peter Zijlstra wrote: > > On Mon, Oct 09, 2017 at 05:29:04PM +0200, Vincent Guittot wrote: > >> On 9 October 2017 at 17:03, Vincent Guittot > >> wrote: > >> > On 1 September 2017 at 15:

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-10 Thread Vincent Guittot
On 10 October 2017 at 09:29, Peter Zijlstra wrote: > On Mon, Oct 09, 2017 at 05:29:04PM +0200, Vincent Guittot wrote: >> On 9 October 2017 at 17:03, Vincent Guittot >> wrote: >> > On 1 September 2017 at 15:21, Peter Zijlstra wrote: > >> >> +/* >> >> + * When on migration a sched_entity joins/le

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-10 Thread Peter Zijlstra
On Mon, Oct 09, 2017 at 05:29:04PM +0200, Vincent Guittot wrote: > On 9 October 2017 at 17:03, Vincent Guittot > wrote: > > On 1 September 2017 at 15:21, Peter Zijlstra wrote: > >> +/* > >> + * When on migration a sched_entity joins/leaves the PELT hierarchy, we > >> need to > >> + * propagate

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-09 Thread Vincent Guittot
On 9 October 2017 at 17:03, Vincent Guittot wrote: > Hi Peter, > > On 1 September 2017 at 15:21, Peter Zijlstra wrote: >> When an entity migrates in (or out) of a runqueue, we need to add (or >> remove) its contribution from the entire PELT hierarchy, because even >> non-runnable entities are inc

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-09 Thread Vincent Guittot
Hi Peter, On 1 September 2017 at 15:21, Peter Zijlstra wrote: > When an entity migrates in (or out) of a runqueue, we need to add (or > remove) its contribution from the entire PELT hierarchy, because even > non-runnable entities are included in the load average sums. > > In order to do this we h

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-09 Thread Peter Zijlstra
On Mon, Oct 09, 2017 at 09:08:57AM +0100, Morten Rasmussen wrote: > > --- a/kernel/sched/debug.c > > +++ b/kernel/sched/debug.c > > @@ -565,6 +565,8 @@ void print_cfs_rq(struct seq_file *m, in > > cfs_rq->removed.load_avg); > > SEQ_printf(m, " .%-30s: %ld\n", "removed.util_

Re: [PATCH -v2 12/18] sched/fair: Rewrite PELT migration propagation

2017-10-09 Thread Morten Rasmussen
On Fri, Sep 01, 2017 at 03:21:11PM +0200, Peter Zijlstra wrote: > When an entity migrates in (or out) of a runqueue, we need to add (or > remove) its contribution from the entire PELT hierarchy, because even > non-runnable entities are included in the load average sums. > > In order to do this we