Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Valentin Schneider
On 02/09/2018 11:41 AM, Vincent Guittot wrote: > On 8 February 2018 at 20:21, Valentin Schneider > wrote: >> On 02/08/2018 01:36 PM, Vincent Guittot wrote: >>> On 8 February 2018 at 13:46, Valentin Schneider >>> wrote: On 02/06/2018

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Valentin Schneider
On 02/09/2018 11:41 AM, Vincent Guittot wrote: > On 8 February 2018 at 20:21, Valentin Schneider > wrote: >> On 02/08/2018 01:36 PM, Vincent Guittot wrote: >>> On 8 February 2018 at 13:46, Valentin Schneider >>> wrote: On 02/06/2018 07:23 PM, Vincent Guittot wrote: > [...] > >> >> In

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 05:52:00PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 16:44, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > >> On 8 February 2018 at 15:00, Peter Zijlstra wrote: > >> > On

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 05:52:00PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 16:44, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > >> On 8 February 2018 at 15:00, Peter Zijlstra wrote: > >> > On Tue, Feb 06, 2018 at 08:23:05PM +0100,

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Vincent Guittot
On 8 February 2018 at 20:21, Valentin Schneider wrote: > On 02/08/2018 01:36 PM, Vincent Guittot wrote: >> On 8 February 2018 at 13:46, Valentin Schneider >> wrote: >>> On 02/06/2018 07:23 PM, Vincent Guittot wrote: [...] > > For now

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Vincent Guittot
On 8 February 2018 at 20:21, Valentin Schneider wrote: > On 02/08/2018 01:36 PM, Vincent Guittot wrote: >> On 8 February 2018 at 13:46, Valentin Schneider >> wrote: >>> On 02/06/2018 07:23 PM, Vincent Guittot wrote: [...] > > For now I've been using those made-up rt-app workloads to stress

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Andrea Parri
On Thu, Feb 08, 2018 at 04:03:41PM +, Will Deacon wrote: > On Thu, Feb 08, 2018 at 04:46:43PM +0100, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > > > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > > > > > Without this ordering I

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-09 Thread Andrea Parri
On Thu, Feb 08, 2018 at 04:03:41PM +, Will Deacon wrote: > On Thu, Feb 08, 2018 at 04:46:43PM +0100, Peter Zijlstra wrote: > > On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > > > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > > > > > Without this ordering I

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Valentin Schneider
On 02/08/2018 01:36 PM, Vincent Guittot wrote: > On 8 February 2018 at 13:46, Valentin Schneider > wrote: >> On 02/06/2018 07:23 PM, Vincent Guittot wrote: >>> [...] >>> @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env >>> *env, >>>

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Valentin Schneider
On 02/08/2018 01:36 PM, Vincent Guittot wrote: > On 8 February 2018 at 13:46, Valentin Schneider > wrote: >> On 02/06/2018 07:23 PM, Vincent Guittot wrote: >>> [...] >>> @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env >>> *env, >>> for_each_cpu_and(i,

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 16:44, Peter Zijlstra wrote: > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: >> On 8 February 2018 at 15:00, Peter Zijlstra wrote: >> > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: >> > >> >>

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 16:44, Peter Zijlstra wrote: > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: >> On 8 February 2018 at 15:00, Peter Zijlstra wrote: >> > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: >> > >> >> @@ -9207,13 +9231,15 @@ void

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Will Deacon
On Thu, Feb 08, 2018 at 04:46:43PM +0100, Peter Zijlstra wrote: > On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > > > Without this ordering I think it would be possible to loose has_blocked > > > and not observe

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Will Deacon
On Thu, Feb 08, 2018 at 04:46:43PM +0100, Peter Zijlstra wrote: > On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > > > Without this ordering I think it would be possible to loose has_blocked > > > and not observe

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > Without this ordering I think it would be possible to loose has_blocked > > and not observe the CPU either. > > I had a quick look at this, and I think you're right.

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 03:30:31PM +, Will Deacon wrote: > On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > > Without this ordering I think it would be possible to loose has_blocked > > and not observe the CPU either. > > I had a quick look at this, and I think you're right.

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 15:00, Peter Zijlstra wrote: > > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > > >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > >> if

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 15:00, Peter Zijlstra wrote: > > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > > >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > >> if (!housekeeping_cpu(cpu,

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Will Deacon
On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > @@ -9222,6 +9248,13 @@ void nohz_balance_enter_idle(int cpu) > > atomic_inc(_cpus); > > > > set_cpu_sd_state_idle(cpu); > > /* >* Ensures

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Will Deacon
On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > @@ -9222,6 +9248,13 @@ void nohz_balance_enter_idle(int cpu) > > atomic_inc(_cpus); > > > > set_cpu_sd_state_idle(cpu); > > /* >* Ensures

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 15:00, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) >> if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) >> return; >> >> +

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 15:00, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) >> if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) >> return; >> >> + rq->has_blocked_load =

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > > @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > > if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > > return; > > > > +

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 03:00:05PM +0100, Peter Zijlstra wrote: > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > > > @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > > if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > > return; > > > > +

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > return; > > + rq->has_blocked_load = 1; > + > if (rq->nohz_tick_stopped) > -

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > return; > > + rq->has_blocked_load = 1; > + > if (rq->nohz_tick_stopped) > -

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 13:46, Valentin Schneider wrote: > On 02/06/2018 07:23 PM, Vincent Guittot wrote: >> [...] >> @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env >> *env, >> for_each_cpu_and(i, sched_group_span(group), env->cpus) { >>

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Vincent Guittot
On 8 February 2018 at 13:46, Valentin Schneider wrote: > On 02/06/2018 07:23 PM, Vincent Guittot wrote: >> [...] >> @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env >> *env, >> for_each_cpu_and(i, sched_group_span(group), env->cpus) { >> struct rq *rq

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 12:46:53PM +, Valentin Schneider wrote: > On 02/06/2018 07:23 PM, Vincent Guittot wrote: > > [...] > > @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env > > *env, > > for_each_cpu_and(i, sched_group_span(group), env->cpus) { > >

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Peter Zijlstra
On Thu, Feb 08, 2018 at 12:46:53PM +, Valentin Schneider wrote: > On 02/06/2018 07:23 PM, Vincent Guittot wrote: > > [...] > > @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env > > *env, > > for_each_cpu_and(i, sched_group_span(group), env->cpus) { > >

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Valentin Schneider
On 02/06/2018 07:23 PM, Vincent Guittot wrote: > [...] > @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env > *env, > for_each_cpu_and(i, sched_group_span(group), env->cpus) { > struct rq *rq = cpu_rq(i); > > - if (env->flags &

Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-08 Thread Valentin Schneider
On 02/06/2018 07:23 PM, Vincent Guittot wrote: > [...] > @@ -7826,8 +7842,8 @@ static inline void update_sg_lb_stats(struct lb_env > *env, > for_each_cpu_and(i, sched_group_span(group), env->cpus) { > struct rq *rq = cpu_rq(i); > > - if (env->flags &

[PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-06 Thread Vincent Guittot
Stopped the periodic update of blocked load when all idle CPUs have fully decayed. We introduce a new nohz.has_blocked that reflect if some idle CPUs has blocked load that have to be periodiccally updated. nohz.has_blocked is set everytime that a Idle CPU can have blocked load and it is then clear

[PATCH v2 1/3] sched: Stop nohz stats when decayed

2018-02-06 Thread Vincent Guittot
Stopped the periodic update of blocked load when all idle CPUs have fully decayed. We introduce a new nohz.has_blocked that reflect if some idle CPUs has blocked load that have to be periodiccally updated. nohz.has_blocked is set everytime that a Idle CPU can have blocked load and it is then clear