Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-18 Thread Frederic Weisbecker
On Wed, Apr 13, 2016 at 03:56:52PM +0200, Frederic Weisbecker wrote: > Some code in cpu load update only concern NO_HZ configs but it is > built on all configurations. When NO_HZ isn't built, that code is harmless > but just happens to take some useless ressources in CPU and memory: > > 1) one use

[PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-13 Thread Frederic Weisbecker
Some code in cpu load update only concern NO_HZ configs but it is built on all configurations. When NO_HZ isn't built, that code is harmless but just happens to take some useless ressources in CPU and memory: 1) one useless field in struct rq 2) jiffies record on every tick that is never used (cpu

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-12 Thread Peter Zijlstra
On Mon, Apr 11, 2016 at 08:21:31PM +0200, Frederic Weisbecker wrote: > On Mon, Apr 11, 2016 at 10:53:01AM -0400, Chris Metcalf wrote: > > On 4/11/2016 9:18 AM, Frederic Weisbecker wrote: > > >So I tried and it warns about the unused variable tickless_load, so I > > >would need two scattered ifdeffe

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-11 Thread Frederic Weisbecker
On Mon, Apr 11, 2016 at 10:53:01AM -0400, Chris Metcalf wrote: > On 4/11/2016 9:18 AM, Frederic Weisbecker wrote: > >So I tried and it warns about the unused variable tickless_load, so I > >would need two scattered ifdeffery in the function: > > > >@@ -4528,7 +4529,9 @@ decay_load_missed(unsigned l

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-11 Thread Chris Metcalf
On 4/11/2016 9:18 AM, Frederic Weisbecker wrote: So I tried and it warns about the unused variable tickless_load, so I would need two scattered ifdeffery in the function: @@ -4528,7 +4529,9 @@ decay_load_missed(unsigned long load, unsigned long missed_updates, int idx) static void cpu_load_up

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-11 Thread Frederic Weisbecker
On Fri, Apr 08, 2016 at 07:44:14PM +0200, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 02:55:22PM +0200, Frederic Weisbecker wrote: > > > > @@ -4540,17 +4568,8 @@ static void cpu_load_update(struct rq *this_rq, > > > > unsigned long this_load, > > > > > > > > /* scale is effec

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-08 Thread Peter Zijlstra
On Fri, Apr 08, 2016 at 02:55:22PM +0200, Frederic Weisbecker wrote: > > > @@ -4540,17 +4568,8 @@ static void cpu_load_update(struct rq *this_rq, > > > unsigned long this_load, > > > > > > /* scale is effectively 1 << i now, and >> i divides by scale */ > > > > > > - old_load

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-08 Thread Frederic Weisbecker
On Fri, Apr 08, 2016 at 12:48:21PM +0200, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 03:07:13AM +0200, Frederic Weisbecker wrote: > > index 4c522a7..59a2821 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -7327,8 +7327,9 @@ void __init sched_init(void) > > > >

Re: [PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-08 Thread Peter Zijlstra
On Fri, Apr 08, 2016 at 03:07:13AM +0200, Frederic Weisbecker wrote: > index 4c522a7..59a2821 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -7327,8 +7327,9 @@ void __init sched_init(void) > > for (j = 0; j < CPU_LOAD_IDX_MAX; j++) > rq->cp

[PATCH 3/3] sched: Optimize !CONFIG_NO_HZ_COMMON cpu load updates

2016-04-07 Thread Frederic Weisbecker
Some code in cpu load update only concern NO_HZ configs but it is built on all configurations. When NO_HZ isn't built, that code is harmless but just happens to take some useless ressources in CPU and memory: 1) one useless field in struct rq 2) jiffies record on every tick that is never used (cpu