Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-21 Thread Vincent Guittot
On 20 December 2017 at 15:27, Vincent Guittot wrote: > On 20 December 2017 at 15:09, Peter Zijlstra wrote: >> On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: >> >>> @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-21 Thread Vincent Guittot
On 20 December 2017 at 15:27, Vincent Guittot wrote: > On 20 December 2017 at 15:09, Peter Zijlstra wrote: >> On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: >> >>> @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, >>> enum cpu_idle_type idle) >>>

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-21 Thread Vincent Guittot
Le Wednesday 20 Dec 2017 à 16:01:10 (+0100), Peter Zijlstra a écrit : > On Wed, Dec 20, 2017 at 03:23:01PM +0100, Vincent Guittot wrote: > > On 20 December 2017 at 15:03, Peter Zijlstra wrote: > > > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > > >> @@

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-21 Thread Vincent Guittot
Le Wednesday 20 Dec 2017 à 16:01:10 (+0100), Peter Zijlstra a écrit : > On Wed, Dec 20, 2017 at 03:23:01PM +0100, Vincent Guittot wrote: > > On 20 December 2017 at 15:03, Peter Zijlstra wrote: > > > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > > >> @@ -8955,8 +8964,20 @@

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Wed, Dec 20, 2017 at 04:01:10PM +0100, Peter Zijlstra wrote: > Well, you shouldn't mix atomic and non-atomic ops to the same word, > that's asking for trouble. > > But why don't you do something like: > > nohz_kick() > > flags = NOHZ_STAT; > if (!only_update) >

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Wed, Dec 20, 2017 at 04:01:10PM +0100, Peter Zijlstra wrote: > Well, you shouldn't mix atomic and non-atomic ops to the same word, > that's asking for trouble. > > But why don't you do something like: > > nohz_kick() > > flags = NOHZ_STAT; > if (!only_update) >

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Wed, Dec 20, 2017 at 03:23:01PM +0100, Vincent Guittot wrote: > On 20 December 2017 at 15:03, Peter Zijlstra wrote: > > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > >> @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) > >> if (ilb_cpu

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Wed, Dec 20, 2017 at 03:23:01PM +0100, Vincent Guittot wrote: > On 20 December 2017 at 15:03, Peter Zijlstra wrote: > > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > >> @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) > >> if (ilb_cpu >= nr_cpu_ids) > >>

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Vincent Guittot
On 20 December 2017 at 15:09, Peter Zijlstra wrote: > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > >> @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, >> enum cpu_idle_type idle) >>

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Vincent Guittot
On 20 December 2017 at 15:09, Peter Zijlstra wrote: > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > >> @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, >> enum cpu_idle_type idle) >> cpu_load_update_idle(rq); >>

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Vincent Guittot
On 20 December 2017 at 15:03, Peter Zijlstra wrote: > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: >> @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) >> if (ilb_cpu >= nr_cpu_ids) >> return; >> >> - if

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Vincent Guittot
On 20 December 2017 at 15:03, Peter Zijlstra wrote: > On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: >> @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) >> if (ilb_cpu >= nr_cpu_ids) >> return; >> >> - if (test_and_set_bit(NOHZ_BALANCE_KICK,

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, enum > cpu_idle_type idle) > cpu_load_update_idle(rq); > rq_unlock_irq(rq, ); > > -

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, enum > cpu_idle_type idle) > cpu_load_update_idle(rq); > rq_unlock_irq(rq, ); > > -

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) > if (ilb_cpu >= nr_cpu_ids) > return; > > - if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu))) > + if

Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-20 Thread Peter Zijlstra
On Fri, Dec 01, 2017 at 06:01:56PM +, Brendan Jackman wrote: > @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void) > if (ilb_cpu >= nr_cpu_ids) > return; > > - if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu))) > + if

[PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-01 Thread Brendan Jackman
From: Vincent Guittot When idle, the blocked load of CPUs will be updated only when an idle load balance is triggered which may never happen. Because of this uncertainty on the execution of idle load balance, the utilization, the load and the shares of idle cfs_rq can

[PATCH v2 1/2] sched: force update of blocked load of idle cpus

2017-12-01 Thread Brendan Jackman
From: Vincent Guittot When idle, the blocked load of CPUs will be updated only when an idle load balance is triggered which may never happen. Because of this uncertainty on the execution of idle load balance, the utilization, the load and the shares of idle cfs_rq can stay artificially high and