Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 14:38, Peter Zijlstra wrote: > On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: > >> +static bool is_buddy_busy(int cpu) >> +{ >> + struct rq *rq = cpu_rq(cpu); >> + u32 sum = rq->avg.runnable_avg_sum; >> + u32 period = rq->avg.runnable_avg_period; >>

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 14:30, Peter Zijlstra wrote: > On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: >> During the creation of sched_domain, we define a pack buddy CPU for each CPU >> when one is available. We want to pack at all levels where a group of CPUs >> can >> be power gated

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: > +static bool is_buddy_busy(int cpu) > +{ > + struct rq *rq = cpu_rq(cpu); > + u32 sum = rq->avg.runnable_avg_sum; > + u32 period = rq->avg.runnable_avg_period; > + > + /* > + * If a CPU accesses the

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: > During the creation of sched_domain, we define a pack buddy CPU for each CPU > when one is available. We want to pack at all levels where a group of CPUs can > be power gated independently from others. > On a system that can't

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: During the creation of sched_domain, we define a pack buddy CPU for each CPU when one is available. We want to pack at all levels where a group of CPUs can be power gated independently from others. On a system that can't power

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + u32 sum = rq-avg.runnable_avg_sum; + u32 period = rq-avg.runnable_avg_period; + + /* + * If a CPU accesses the runnable_avg_sum and

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 14:30, Peter Zijlstra pet...@infradead.org wrote: On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: During the creation of sched_domain, we define a pack buddy CPU for each CPU when one is available. We want to pack at all levels where a group of CPUs can be

Re: [PATCH 03/14] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 14:38, Peter Zijlstra pet...@infradead.org wrote: On Thu, Apr 25, 2013 at 07:23:19PM +0200, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + u32 sum = rq-avg.runnable_avg_sum; + u32 period =

[PATCH 03/14] sched: pack small tasks

2013-04-25 Thread Vincent Guittot
During the creation of sched_domain, we define a pack buddy CPU for each CPU when one is available. We want to pack at all levels where a group of CPUs can be power gated independently from others. On a system that can't power gate a group of CPUs independently, the flag is set at all sched_domain

[PATCH 03/14] sched: pack small tasks

2013-04-25 Thread Vincent Guittot
During the creation of sched_domain, we define a pack buddy CPU for each CPU when one is available. We want to pack at all levels where a group of CPUs can be power gated independently from others. On a system that can't power gate a group of CPUs independently, the flag is set at all sched_domain