Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-20 Thread Wanpeng Li
Hi Frederic, 2016-04-13 21:56 GMT+08:00 Frederic Weisbecker : > Ticks can happen while the CPU is in dynticks-idle or dynticks-singletask > mode. In fact "nohz" or "dynticks" only mean that we exit the periodic > mode and we try to minimize the ticks as much as possible. The nohz > subsystem uses a

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-19 Thread Frederic Weisbecker
On Tue, Apr 19, 2016 at 09:01:00AM +0900, Byungchul Park wrote: > On Mon, Apr 18, 2016 at 03:35:06PM +0200, Frederic Weisbecker wrote: > > On Mon, Apr 18, 2016 at 06:17:21PM +0900, Byungchul Park wrote: > > > On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote: > > > > @@ -4645,11 +

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-18 Thread Byungchul Park
On Mon, Apr 18, 2016 at 03:35:06PM +0200, Frederic Weisbecker wrote: > On Mon, Apr 18, 2016 at 06:17:21PM +0900, Byungchul Park wrote: > > On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote: > > > @@ -4645,11 +4674,11 @@ void cpu_load_update_nohz(int active) > > > void cpu_load_up

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-18 Thread Frederic Weisbecker
On Mon, Apr 18, 2016 at 06:17:21PM +0900, Byungchul Park wrote: > On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote: > > @@ -4645,11 +4674,11 @@ void cpu_load_update_nohz(int active) > > void cpu_load_update_active(struct rq *this_rq) > > { > > unsigned long load = weighted_

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-18 Thread Byungchul Park
On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote: > @@ -4645,11 +4674,11 @@ void cpu_load_update_nohz(int active) > void cpu_load_update_active(struct rq *this_rq) > { > unsigned long load = weighted_cpuload(cpu_of(this_rq)); > - /* > - * See the mess around cpu_

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-18 Thread Byungchul Park
On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote: > @@ -4524,12 +4523,12 @@ decay_load_missed(unsigned long load, unsigned long > missed_updates, int idx) > * load[i]_n = (1 - 1/2^i)^n * load[i]_0 > * > * see decay_load_misses(). For NOHZ_FULL we get to subtract and add

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-08 Thread Peter Zijlstra
On Fri, Apr 08, 2016 at 02:53:21PM +0200, Frederic Weisbecker wrote: > On Fri, Apr 08, 2016 at 11:41:54AM +0200, Peter Zijlstra wrote: > > On Fri, Apr 08, 2016 at 03:07:12AM +0200, Frederic Weisbecker wrote: > > > +void cpu_load_update_nohz_start(void) > > > { > > > struct rq *this_rq = this_rq(

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-08 Thread Frederic Weisbecker
On Fri, Apr 08, 2016 at 11:41:54AM +0200, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 03:07:12AM +0200, Frederic Weisbecker wrote: > > +void cpu_load_update_nohz_start(void) > > { > > struct rq *this_rq = this_rq(); > > + > > + /* > > +* This is all lockless but should be fine. If we

Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting

2016-04-08 Thread Peter Zijlstra
On Fri, Apr 08, 2016 at 03:07:12AM +0200, Frederic Weisbecker wrote: > +void cpu_load_update_nohz_start(void) > { > struct rq *this_rq = this_rq(); > + > + /* > + * This is all lockless but should be fine. If weighted_cpuload changes > + * concurrently we'll exit nohz. And cpu_