Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-26 Thread Peter Zijlstra
On Sat, Aug 24, 2013 at 03:15:57AM -0700, Paul Turner wrote: > > +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) > > +{ > > + /* > > +* struct sd_lb_stats { > > +* struct sched_group * busiest; // 0 > > 8 > > +*

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-26 Thread Peter Zijlstra
On Sat, Aug 24, 2013 at 03:15:57AM -0700, Paul Turner wrote: +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) +{ + /* +* struct sd_lb_stats { +* struct sched_group * busiest; // 0 8 +* struct

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-24 Thread Paul Turner
On Mon, Aug 19, 2013 at 9:01 AM, Peter Zijlstra wrote: > We can shrink sg_lb_stats because rq::nr_running is an 'unsigned int' > and cpu numbers are 'int' > > Before: > sgs:/* size: 72, cachelines: 2, members: 10 */ > sds:/* size: 184, cachelines: 3, members: 7 */ > > After: >

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-24 Thread Paul Turner
On Mon, Aug 19, 2013 at 9:01 AM, Peter Zijlstra pet...@infradead.org wrote: We can shrink sg_lb_stats because rq::nr_running is an 'unsigned int' and cpu numbers are 'int' Before: sgs:/* size: 72, cachelines: 2, members: 10 */ sds:/* size: 184, cachelines: 3, members: 7

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2013 at 11:20:02AM +0900, Joonsoo Kim wrote: > > With below change, we can simply do 'offsetof(struct sd_lb_stats, > > busiest_stat)'. > > > > @@ -4546,7 +4546,7 @@ static bool update_sd_pick_busiest(struct lb_env *env, > >struct sched_group

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2013 at 11:08:29AM +0900, Joonsoo Kim wrote: > On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: > > +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) > > +{ > > + /* > > +* struct sd_lb_stats { > > +* struct sched_group * busiest;

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2013 at 11:08:29AM +0900, Joonsoo Kim wrote: On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) +{ + /* +* struct sd_lb_stats { +* struct sched_group * busiest;

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-21 Thread Peter Zijlstra
On Wed, Aug 21, 2013 at 11:20:02AM +0900, Joonsoo Kim wrote: With below change, we can simply do 'offsetof(struct sd_lb_stats, busiest_stat)'. @@ -4546,7 +4546,7 @@ static bool update_sd_pick_busiest(struct lb_env *env, struct sched_group *sg,

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-20 Thread Joonsoo Kim
On Wed, Aug 21, 2013 at 11:08:29AM +0900, Joonsoo Kim wrote: > On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: > > +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) > > +{ > > + /* > > +* struct sd_lb_stats { > > +* struct sched_group * busiest;

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-20 Thread Joonsoo Kim
On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: > +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) > +{ > + /* > + * struct sd_lb_stats { > + * struct sched_group * busiest; // 0 8 > + * struct sched_group *

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-20 Thread Joonsoo Kim
On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) +{ + /* + * struct sd_lb_stats { + * struct sched_group * busiest; // 0 8 + * struct sched_group *

Re: [PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-20 Thread Joonsoo Kim
On Wed, Aug 21, 2013 at 11:08:29AM +0900, Joonsoo Kim wrote: On Mon, Aug 19, 2013 at 06:01:02PM +0200, Peter Zijlstra wrote: +static inline void init_sd_lb_stats(struct sd_lb_stats *sds) +{ + /* +* struct sd_lb_stats { +* struct sched_group * busiest;

[PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-19 Thread Peter Zijlstra
We can shrink sg_lb_stats because rq::nr_running is an 'unsigned int' and cpu numbers are 'int' Before: sgs:/* size: 72, cachelines: 2, members: 10 */ sds:/* size: 184, cachelines: 3, members: 7 */ After: sgs:/* size: 56, cachelines: 1, members: 10 */ sds:

[PATCH 04/10] sched, fair: Shrink sg_lb_stats and play memset games

2013-08-19 Thread Peter Zijlstra
We can shrink sg_lb_stats because rq::nr_running is an 'unsigned int' and cpu numbers are 'int' Before: sgs:/* size: 72, cachelines: 2, members: 10 */ sds:/* size: 184, cachelines: 3, members: 7 */ After: sgs:/* size: 56, cachelines: 1, members: 10 */ sds: