Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-16 Thread JoonSoo Kim
>> - if (sds->max_load < sds->avg_load) { >> + if (busiest->avg_load < this->avg_load) { > > Tsk, inconsistency there. Okay, this is my mistake. > >> - max_pull = min(sds->max_load - sds->avg_load, load_above_capacity); >> + max_pull = min(busiest->avg_load - sds->sd_avg_load, >>

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-16 Thread JoonSoo Kim
2013/8/15 Peter Zijlstra : > On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: >> There is no reason to maintain separate variables for this_group >> and busiest_group in sd_lb_stat, except saving some space. >> But this structure is always allocated in stack, so this saving >> isn't

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-16 Thread JoonSoo Kim
2013/8/15 Peter Zijlstra pet...@infradead.org: On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: There is no reason to maintain separate variables for this_group and busiest_group in sd_lb_stat, except saving some space. But this structure is always allocated in stack, so this

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-16 Thread JoonSoo Kim
- if (sds-max_load sds-avg_load) { + if (busiest-avg_load this-avg_load) { Tsk, inconsistency there. Okay, this is my mistake. - max_pull = min(sds-max_load - sds-avg_load, load_above_capacity); + max_pull = min(busiest-avg_load - sds-sd_avg_load, +

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: > - if (sds->group_imb) { > - sds->busiest_load_per_task = > - min(sds->busiest_load_per_task, sds->avg_load); > + if (busiest->group_imb) { > + busiest->load_per_task = > +

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
Another little diff. --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4647,8 +4647,10 @@ static inline void update_sd_lb_stats(st int local_group; local_group = cpumask_test_cpu(env->dst_cpu, sched_group_cpus(sg)); - if (local_group) +

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: > There is no reason to maintain separate variables for this_group > and busiest_group in sd_lb_stat, except saving some space. > But this structure is always allocated in stack, so this saving > isn't really benificial. > > This patch

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: There is no reason to maintain separate variables for this_group and busiest_group in sd_lb_stat, except saving some space. But this structure is always allocated in stack, so this saving isn't really benificial. This patch unify

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
Another little diff. --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4647,8 +4647,10 @@ static inline void update_sd_lb_stats(st int local_group; local_group = cpumask_test_cpu(env-dst_cpu, sched_group_cpus(sg)); - if (local_group) +

Re: [PATCH v3 3/3] sched: clean-up struct sd_lb_stat

2013-08-15 Thread Peter Zijlstra
On Tue, Aug 06, 2013 at 05:36:43PM +0900, Joonsoo Kim wrote: - if (sds-group_imb) { - sds-busiest_load_per_task = - min(sds-busiest_load_per_task, sds-avg_load); + if (busiest-group_imb) { + busiest-load_per_task = +