Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-14 Thread Yuyang Du
Hi Dietmar, On Thu, Apr 14, 2016 at 01:52:43PM +0100, Dietmar Eggemann wrote: > On 13/04/16 19:44, Yuyang Du wrote: > > On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: > > [...] > > > By "bailing out", you mean return without update because the delta is less > > than 1ms? > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-14 Thread Yuyang Du
Hi Dietmar, On Thu, Apr 14, 2016 at 01:52:43PM +0100, Dietmar Eggemann wrote: > On 13/04/16 19:44, Yuyang Du wrote: > > On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: > > [...] > > > By "bailing out", you mean return without update because the delta is less > > than 1ms? > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-14 Thread Dietmar Eggemann
On 13/04/16 19:44, Yuyang Du wrote: > On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: [...] > By "bailing out", you mean return without update because the delta is less > than 1ms? yes. > >>> Examples of 1 periodic task pinned to a cpu on an ARM64 system, HZ=250 >>> in steady

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-14 Thread Dietmar Eggemann
On 13/04/16 19:44, Yuyang Du wrote: > On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: [...] > By "bailing out", you mean return without update because the delta is less > than 1ms? yes. > >>> Examples of 1 periodic task pinned to a cpu on an ARM64 system, HZ=250 >>> in steady

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Yuyang Du
On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: > > For a periodic task, the signals really get much more unstable. Even for > > a steady state (load/util related) periodic task there is a meander > > pattern which depends on if we for instance hit a dequeue (decay + > > accrue)

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Yuyang Du
On Wed, Apr 13, 2016 at 05:28:18PM +0200, Vincent Guittot wrote: > > For a periodic task, the signals really get much more unstable. Even for > > a steady state (load/util related) periodic task there is a meander > > pattern which depends on if we for instance hit a dequeue (decay + > > accrue)

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 13 April 2016 at 17:28, Vincent Guittot wrote: > On 13 April 2016 at 17:13, Dietmar Eggemann wrote: >> On 10/04/16 23:36, Yuyang Du wrote: >>> In __update_load_avg(), the current period is never complete. This >>> basically leads to a

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 13 April 2016 at 17:28, Vincent Guittot wrote: > On 13 April 2016 at 17:13, Dietmar Eggemann wrote: >> On 10/04/16 23:36, Yuyang Du wrote: >>> In __update_load_avg(), the current period is never complete. This >>> basically leads to a slightly over-decayed average, say on average we >>> have

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 13 April 2016 at 17:13, Dietmar Eggemann wrote: > On 10/04/16 23:36, Yuyang Du wrote: >> In __update_load_avg(), the current period is never complete. This >> basically leads to a slightly over-decayed average, say on average we >> have 50% current period, then we

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 13 April 2016 at 17:13, Dietmar Eggemann wrote: > On 10/04/16 23:36, Yuyang Du wrote: >> In __update_load_avg(), the current period is never complete. This >> basically leads to a slightly over-decayed average, say on average we >> have 50% current period, then we will lose

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Dietmar Eggemann
On 10/04/16 23:36, Yuyang Du wrote: > In __update_load_avg(), the current period is never complete. This > basically leads to a slightly over-decayed average, say on average we > have 50% current period, then we will lose 1.08%(=(1-0.5^(1/64)) of > past avg. More importantly, the incomplete

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Dietmar Eggemann
On 10/04/16 23:36, Yuyang Du wrote: > In __update_load_avg(), the current period is never complete. This > basically leads to a slightly over-decayed average, say on average we > have 50% current period, then we will lose 1.08%(=(1-0.5^(1/64)) of > past avg. More importantly, the incomplete

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 12 April 2016 at 23:09, Yuyang Du wrote: > > Hi Vincent, > > On Tue, Apr 12, 2016 at 01:56:45PM +0200, Vincent Guittot wrote: > > Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > > > Hi Vincent, > > > > > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Vincent Guittot
On 12 April 2016 at 23:09, Yuyang Du wrote: > > Hi Vincent, > > On Tue, Apr 12, 2016 at 01:56:45PM +0200, Vincent Guittot wrote: > > Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > > > Hi Vincent, > > > > > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Morten Rasmussen
On Wed, Apr 13, 2016 at 04:14:48AM +0800, Yuyang Du wrote: > On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > > On 10/04/16 23:36, Yuyang Du wrote: > > > > [...] > > > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > > __update_load_avg(u64 now, int cpu, struct

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-13 Thread Morten Rasmussen
On Wed, Apr 13, 2016 at 04:14:48AM +0800, Yuyang Du wrote: > On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > > On 10/04/16 23:36, Yuyang Du wrote: > > > > [...] > > > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > > __update_load_avg(u64 now, int cpu, struct

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Yuyang Du
Hi Vincent, On Tue, Apr 12, 2016 at 01:56:45PM +0200, Vincent Guittot wrote: > Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > > Hi Vincent, > > > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Yuyang Du
Hi Vincent, On Tue, Apr 12, 2016 at 01:56:45PM +0200, Vincent Guittot wrote: > Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > > Hi Vincent, > > > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Joe Perches
On Wed, 2016-04-13 at 04:14 +0800, Yuyang Du wrote: > On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > > On 10/04/16 23:36, Yuyang Du wrote: > > [...] > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > >  __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > >  

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Joe Perches
On Wed, 2016-04-13 at 04:14 +0800, Yuyang Du wrote: > On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > > On 10/04/16 23:36, Yuyang Du wrote: > > [...] > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > >  __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > >  

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Yuyang Du
On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > On 10/04/16 23:36, Yuyang Du wrote: > > [...] > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > unsigned long weight, int running, struct

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Yuyang Du
On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > On 10/04/16 23:36, Yuyang Du wrote: > > [...] > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > unsigned long weight, int running, struct

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Dietmar Eggemann
On 10/04/16 23:36, Yuyang Du wrote: [...] > @@ -2704,11 +2694,14 @@ static __always_inline int > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > unsigned long weight, int running, struct cfs_rq *cfs_rq) > { > - u64 delta, scaled_delta, periods; > - u32

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Dietmar Eggemann
On 10/04/16 23:36, Yuyang Du wrote: [...] > @@ -2704,11 +2694,14 @@ static __always_inline int > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > unsigned long weight, int running, struct cfs_rq *cfs_rq) > { > - u64 delta, scaled_delta, periods; > - u32

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Vincent Guittot
Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > Hi Vincent, > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-12 Thread Vincent Guittot
Le Tuesday 12 Apr 2016 à 03:41:41 (+0800), Yuyang Du a écrit : > Hi Vincent, > > On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > >

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Yuyang Du
Hi Vincent, On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > @@ -2704,11 +2694,14 @@ static __always_inline int > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > unsigned long weight, int running, struct cfs_rq *cfs_rq) > > { > > - u64

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Yuyang Du
Hi Vincent, On Mon, Apr 11, 2016 at 11:08:04AM +0200, Vincent Guittot wrote: > > @@ -2704,11 +2694,14 @@ static __always_inline int > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > unsigned long weight, int running, struct cfs_rq *cfs_rq) > > { > > - u64

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Vincent Guittot
Hi Yuyang On 11 April 2016 at 00:36, Yuyang Du wrote: > In __update_load_avg(), the current period is never complete. This > basically leads to a slightly over-decayed average, say on average we yes, that also explains why we almost never reach the max value > have 50%

Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Vincent Guittot
Hi Yuyang On 11 April 2016 at 00:36, Yuyang Du wrote: > In __update_load_avg(), the current period is never complete. This > basically leads to a slightly over-decayed average, say on average we yes, that also explains why we almost never reach the max value > have 50% current period, then we

[PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Yuyang Du
In __update_load_avg(), the current period is never complete. This basically leads to a slightly over-decayed average, say on average we have 50% current period, then we will lose 1.08%(=(1-0.5^(1/64)) of past avg. More importantly, the incomplete current period significantly complicates the avg

[PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue

2016-04-11 Thread Yuyang Du
In __update_load_avg(), the current period is never complete. This basically leads to a slightly over-decayed average, say on average we have 50% current period, then we will lose 1.08%(=(1-0.5^(1/64)) of past avg. More importantly, the incomplete current period significantly complicates the avg