Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-02-03 Thread Michael Wang
On 02/03/2013 01:50 AM, Sebastian Andrzej Siewior wrote: > On 01/31/2013 03:12 AM, Michael Wang wrote: >> I'm not sure, but just concern about this case: >> >> group 0 cpu 0 cpu 1 >> least idle 4 task >> >> group 1 cpu 2

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-02-03 Thread Michael Wang
On 02/03/2013 01:50 AM, Sebastian Andrzej Siewior wrote: On 01/31/2013 03:12 AM, Michael Wang wrote: I'm not sure, but just concern about this case: group 0 cpu 0 cpu 1 least idle 4 task group 1 cpu 2

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-02-02 Thread Sebastian Andrzej Siewior
On 01/31/2013 03:12 AM, Michael Wang wrote: > I'm not sure, but just concern about this case: > > group 0 cpu 0 cpu 1 > least idle 4 task > > group 1 cpu 2 cpu 3 > 1 task

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-02-02 Thread Sebastian Andrzej Siewior
On 01/31/2013 03:12 AM, Michael Wang wrote: I'm not sure, but just concern about this case: group 0 cpu 0 cpu 1 least idle 4 task group 1 cpu 2 cpu 3 1 task

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-02-01 Thread Namhyung Kim
Hi Michael, On Thu, 31 Jan 2013 16:57:49 +0800, Michael Wang wrote: > On 01/31/2013 04:45 PM, Michael Wang wrote: >> On 01/31/2013 04:24 PM, Michael Wang wrote: >>> On 01/31/2013 03:40 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: > On 01/31/2013 02:58

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-02-01 Thread Namhyung Kim
Hi Michael, On Thu, 31 Jan 2013 16:57:49 +0800, Michael Wang wrote: On 01/31/2013 04:45 PM, Michael Wang wrote: On 01/31/2013 04:24 PM, Michael Wang wrote: On 01/31/2013 03:40 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 04:45 PM, Michael Wang wrote: > On 01/31/2013 04:24 PM, Michael Wang wrote: >> On 01/31/2013 03:40 PM, Namhyung Kim wrote: >>> On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim wrote: > But AFAIK the number of states in cpuidle is

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 04:24 PM, Michael Wang wrote: > On 01/31/2013 03:40 PM, Namhyung Kim wrote: >> On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: >>> On 01/31/2013 02:58 PM, Namhyung Kim wrote: But AFAIK the number of states in cpuidle is usually less than 10 so maybe we can change

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 03:40 PM, Namhyung Kim wrote: > On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: >> On 01/31/2013 02:58 PM, Namhyung Kim wrote: >>> But AFAIK the number of states in cpuidle is usually less than 10 so maybe >>> we can change the weight then, but there's no promise... >> >> And

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 03:40 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim wrote: But AFAIK the number of states in cpuidle is usually less than 10 so maybe we can change the weight then, but there's no promise... And I just got

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 04:24 PM, Michael Wang wrote: On 01/31/2013 03:40 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim wrote: But AFAIK the number of states in cpuidle is usually less than 10 so maybe we can change the weight then,

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-31 Thread Michael Wang
On 01/31/2013 04:45 PM, Michael Wang wrote: On 01/31/2013 04:24 PM, Michael Wang wrote: On 01/31/2013 03:40 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim wrote: But AFAIK the number of states in cpuidle is usually less

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Namhyung Kim
On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: > On 01/31/2013 02:58 PM, Namhyung Kim wrote: >> But AFAIK the number of states in cpuidle is usually less than 10 so maybe >> we can change the weight then, but there's no promise... > > And I just got another case we should take care: > >

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 02:58 PM, Namhyung Kim wrote: > On Thu, 31 Jan 2013 14:39:20 +0800, Michael Wang wrote: >> On 01/31/2013 01:16 PM, Namhyung Kim wrote: >>> Anyway, I have an idea with this in mind. It's like adding a new "idle >>> load" to each idle cpu rather than special casing the idle cpus like

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Namhyung Kim
On Thu, 31 Jan 2013 14:39:20 +0800, Michael Wang wrote: > On 01/31/2013 01:16 PM, Namhyung Kim wrote: >> Anyway, I have an idea with this in mind. It's like adding a new "idle >> load" to each idle cpu rather than special casing the idle cpus like >> above. IOW an idle cpu will get very small

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 01:16 PM, Namhyung Kim wrote: > Hi Sebastian and Michael, > > On Thu, 31 Jan 2013 10:12:35 +0800, Michael Wang wrote: >> On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: >>> If a new CPU has to be choosen for a task, then the scheduler first selects >>> the group with the

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Namhyung Kim
Hi Sebastian and Michael, On Thu, 31 Jan 2013 10:12:35 +0800, Michael Wang wrote: > On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: >> If a new CPU has to be choosen for a task, then the scheduler first selects >> the group with the least load. This group is returned if its load is lower

Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: > If a new CPU has to be choosen for a task, then the scheduler first selects > the group with the least load. This group is returned if its load is lower > compared to the group to which the task is currently assigned. > If there are

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: If a new CPU has to be choosen for a task, then the scheduler first selects the group with the least load. This group is returned if its load is lower compared to the group to which the task is currently assigned. If there are several

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Namhyung Kim
Hi Sebastian and Michael, On Thu, 31 Jan 2013 10:12:35 +0800, Michael Wang wrote: On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: If a new CPU has to be choosen for a task, then the scheduler first selects the group with the least load. This group is returned if its load is lower

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 01:16 PM, Namhyung Kim wrote: Hi Sebastian and Michael, On Thu, 31 Jan 2013 10:12:35 +0800, Michael Wang wrote: On 01/31/2013 05:19 AM, Sebastian Andrzej Siewior wrote: If a new CPU has to be choosen for a task, then the scheduler first selects the group with the least load.

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Namhyung Kim
On Thu, 31 Jan 2013 14:39:20 +0800, Michael Wang wrote: On 01/31/2013 01:16 PM, Namhyung Kim wrote: Anyway, I have an idea with this in mind. It's like adding a new idle load to each idle cpu rather than special casing the idle cpus like above. IOW an idle cpu will get very small load weight

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Michael Wang
On 01/31/2013 02:58 PM, Namhyung Kim wrote: On Thu, 31 Jan 2013 14:39:20 +0800, Michael Wang wrote: On 01/31/2013 01:16 PM, Namhyung Kim wrote: Anyway, I have an idea with this in mind. It's like adding a new idle load to each idle cpu rather than special casing the idle cpus like above.

Re: [RFC 2/2] sched/fair: prefer a CPU in the lowest idle state

2013-01-30 Thread Namhyung Kim
On Thu, 31 Jan 2013 15:30:02 +0800, Michael Wang wrote: On 01/31/2013 02:58 PM, Namhyung Kim wrote: But AFAIK the number of states in cpuidle is usually less than 10 so maybe we can change the weight then, but there's no promise... And I just got another case we should take care: