Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 12:30, Peter Zijlstra wrote: > On Wed, Mar 27, 2013 at 12:00:40PM +0100, Vincent Guittot wrote: >> On 27 March 2013 11:21, Preeti U Murthy wrote: >> > Hi, >> > >> > On 03/26/2013 05:56 PM, Peter Zijlstra wrote: >> >> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >>

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Preeti U Murthy
Hi Peter, On 04/26/2013 03:48 PM, Peter Zijlstra wrote: > On Wed, Mar 27, 2013 at 03:51:51PM +0530, Preeti U Murthy wrote: >> Hi, >> >> On 03/26/2013 05:56 PM, Peter Zijlstra wrote: >>> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Wed, Mar 27, 2013 at 12:00:40PM +0100, Vincent Guittot wrote: > On 27 March 2013 11:21, Preeti U Murthy wrote: > > Hi, > > > > On 03/26/2013 05:56 PM, Peter Zijlstra wrote: > >> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: > >>> +static bool is_buddy_busy(int cpu) > >>> +{ > >>> +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Wed, Mar 27, 2013 at 03:51:51PM +0530, Preeti U Murthy wrote: > Hi, > > On 03/26/2013 05:56 PM, Peter Zijlstra wrote: > > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: > >> +static bool is_buddy_busy(int cpu) > >> +{ > >> + struct rq *rq = cpu_rq(cpu); > >> + > >> + /*

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Wed, Mar 27, 2013 at 03:51:51PM +0530, Preeti U Murthy wrote: Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + + /* +* A busy

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Peter Zijlstra
On Wed, Mar 27, 2013 at 12:00:40PM +0100, Vincent Guittot wrote: On 27 March 2013 11:21, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Preeti U Murthy
Hi Peter, On 04/26/2013 03:48 PM, Peter Zijlstra wrote: On Wed, Mar 27, 2013 at 03:51:51PM +0530, Preeti U Murthy wrote: Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-04-26 Thread Vincent Guittot
On 26 April 2013 12:30, Peter Zijlstra pet...@infradead.org wrote: On Wed, Mar 27, 2013 at 12:00:40PM +0100, Vincent Guittot wrote: On 27 March 2013 11:21, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Catalin Marinas
On Wed, Mar 27, 2013 at 05:18:53PM +, Nicolas Pitre wrote: > On Wed, 27 Mar 2013, Catalin Marinas wrote: > > > So if the above works, the scheduler guys can mandate that little CPUs > > are always first and for ARM it would be a matter of getting the right > > CPU topology in the DT

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Nicolas Pitre
On Wed, 27 Mar 2013, Catalin Marinas wrote: > So if the above works, the scheduler guys can mandate that little CPUs > are always first and for ARM it would be a matter of getting the right > CPU topology in the DT (independent of what hw vendors think of CPU > topology) and booting Linux on CPU

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Nicolas Pitre
On Wed, 27 Mar 2013, Vincent Guittot wrote: > On 27 March 2013 09:46, Peter Zijlstra wrote: > > On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: > >> > Isn't this basically related to picking the NO_HZ cpu; if the system > >> > isn't fully symmetric with its power gates you want the

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Vincent Guittot
On 27 March 2013 11:21, Preeti U Murthy wrote: > Hi, > > On 03/26/2013 05:56 PM, Peter Zijlstra wrote: >> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >>> +static bool is_buddy_busy(int cpu) >>> +{ >>> + struct rq *rq = cpu_rq(cpu); >>> + >>> + /* >>> +* A busy

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Preeti U Murthy
Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> +static bool is_buddy_busy(int cpu) >> +{ >> + struct rq *rq = cpu_rq(cpu); >> + >> + /* >> +* A busy buddy is a CPU with a high load or a small load with >> a lot

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Wed, 2013-03-27 at 09:54 +0100, Vincent Guittot wrote: > It's not mandatory to have little cores on low numbers even if it's > advised ARGH! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: > > Isn't this basically related to picking the NO_HZ cpu; if the system > > isn't fully symmetric with its power gates you want the NO_HZ cpu to be > > the 'special' cpu. If it is symmetric we really don't care which core > > is left

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Vincent Guittot
On 27 March 2013 09:46, Peter Zijlstra wrote: > On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: >> > Isn't this basically related to picking the NO_HZ cpu; if the system >> > isn't fully symmetric with its power gates you want the NO_HZ cpu to be >> > the 'special' cpu. If it is

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Wed, 2013-03-27 at 12:48 +0800, Alex Shi wrote: > > Yes, the new forked runnable load was set as full utilisation in V5 > power aware scheduling. PJT, Mike and I both agree on this. PJT just > discussion how to give the full load to new forked task. and we get > agreement in my coming V6 power

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Wed, 2013-03-27 at 12:48 +0800, Alex Shi wrote: Yes, the new forked runnable load was set as full utilisation in V5 power aware scheduling. PJT, Mike and I both agree on this. PJT just discussion how to give the full load to new forked task. and we get agreement in my coming V6 power

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Vincent Guittot
On 27 March 2013 09:46, Peter Zijlstra pet...@infradead.org wrote: On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: Isn't this basically related to picking the NO_HZ cpu; if the system isn't fully symmetric with its power gates you want the NO_HZ cpu to be the 'special' cpu. If it

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: Isn't this basically related to picking the NO_HZ cpu; if the system isn't fully symmetric with its power gates you want the NO_HZ cpu to be the 'special' cpu. If it is symmetric we really don't care which core is left 'running'

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Peter Zijlstra
On Wed, 2013-03-27 at 09:54 +0100, Vincent Guittot wrote: It's not mandatory to have little cores on low numbers even if it's advised ARGH! -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Preeti U Murthy
Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + + /* +* A busy buddy is a CPU with a high load or a small load with a lot of +*

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Vincent Guittot
On 27 March 2013 11:21, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Hi, On 03/26/2013 05:56 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + + /* +* A busy

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Nicolas Pitre
On Wed, 27 Mar 2013, Vincent Guittot wrote: On 27 March 2013 09:46, Peter Zijlstra pet...@infradead.org wrote: On Tue, 2013-03-26 at 08:29 -0700, Arjan van de Ven wrote: Isn't this basically related to picking the NO_HZ cpu; if the system isn't fully symmetric with its power gates you

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Nicolas Pitre
On Wed, 27 Mar 2013, Catalin Marinas wrote: So if the above works, the scheduler guys can mandate that little CPUs are always first and for ARM it would be a matter of getting the right CPU topology in the DT (independent of what hw vendors think of CPU topology) and booting Linux on CPU 4

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-27 Thread Catalin Marinas
On Wed, Mar 27, 2013 at 05:18:53PM +, Nicolas Pitre wrote: On Wed, 27 Mar 2013, Catalin Marinas wrote: So if the above works, the scheduler guys can mandate that little CPUs are always first and for ARM it would be a matter of getting the right CPU topology in the DT (independent of

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Alex Shi
On 03/27/2013 12:33 PM, Preeti U Murthy wrote: > Hi Peter, > > On 03/26/2013 06:07 PM, Peter Zijlstra wrote: >> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >>> +static bool is_light_task(struct task_struct *p) >>> +{ >>> + /* A light task runs less than 20% in average */ >>> +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Preeti U Murthy
Hi Peter, On 03/26/2013 06:07 PM, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> +static bool is_light_task(struct task_struct *p) >> +{ >> + /* A light task runs less than 20% in average */ >> + return ((p->se.avg.runnable_avg_sum * 5) < >> +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Arjan van de Ven
Isn't this basically related to picking the NO_HZ cpu; if the system isn't fully symmetric with its power gates you want the NO_HZ cpu to be the 'special' cpu. If it is symmetric we really don't care which core is left 'running' and we can even select a new pack cpu from the idle cores once the

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:46, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, 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 >> CPU can >> be power gated

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:37, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> +static bool is_light_task(struct task_struct *p) >> +{ >> + /* A light task runs less than 20% in average */ >> + return ((p->se.avg.runnable_avg_sum * 5) < >> +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, 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 > CPU can > be power gated independently from others. > On a system that can't power

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: > +static bool is_light_task(struct task_struct *p) > +{ > + /* A light task runs less than 20% in average */ > + return ((p->se.avg.runnable_avg_sum * 5) < > + (p->se.avg.runnable_avg_period)); > +} OK,

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: > +static bool is_buddy_busy(int cpu) > +{ > + struct rq *rq = cpu_rq(cpu); > + > + /* > +* A busy buddy is a CPU with a high load or a small load with > a lot of > +* running tasks. > +*/ > +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_buddy_busy(int cpu) +{ + struct rq *rq = cpu_rq(cpu); + + /* +* A busy buddy is a CPU with a high load or a small load with a lot of +* running tasks. +*/ + return

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_light_task(struct task_struct *p) +{ + /* A light task runs less than 20% in average */ + return ((p-se.avg.runnable_avg_sum * 5) + (p-se.avg.runnable_avg_period)); +} OK, so we

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Peter Zijlstra
On Fri, 2013-03-22 at 13:25 +0100, 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 CPU can be power gated independently from others. On a system that can't power gate a

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:37, Peter Zijlstra pet...@infradead.org wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_light_task(struct task_struct *p) +{ + /* A light task runs less than 20% in average */ + return ((p-se.avg.runnable_avg_sum * 5) +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:46, Peter Zijlstra pet...@infradead.org wrote: On Fri, 2013-03-22 at 13:25 +0100, 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 CPU can be power

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Arjan van de Ven
Isn't this basically related to picking the NO_HZ cpu; if the system isn't fully symmetric with its power gates you want the NO_HZ cpu to be the 'special' cpu. If it is symmetric we really don't care which core is left 'running' and we can even select a new pack cpu from the idle cores once the

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Preeti U Murthy
Hi Peter, On 03/26/2013 06:07 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_light_task(struct task_struct *p) +{ + /* A light task runs less than 20% in average */ + return ((p-se.avg.runnable_avg_sum * 5) +

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Alex Shi
On 03/27/2013 12:33 PM, Preeti U Murthy wrote: Hi Peter, On 03/26/2013 06:07 PM, Peter Zijlstra wrote: On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: +static bool is_light_task(struct task_struct *p) +{ + /* A light task runs less than 20% in average */ + return

[RFC PATCH v3 3/6] sched: pack small tasks

2013-03-22 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 CPU 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

[RFC PATCH v3 3/6] sched: pack small tasks

2013-03-22 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 CPU 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