Re: [PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-09 Thread Alex Shi
>>
>> 3, power awareness scheduling, patch 13~22,
>> The subset implement my previous power aware scheduling proposal:
>> https://lkml.org/lkml/2012/8/13/139
>> It defines 2 new power aware policy balance and powersaving, and then
>> try to spread or pack tasks on each of sched group level according the
>> different scheduler policy. That can save much power when task number in
>> system is no more then LCPU number.
> 
> Interesting stuff. I have read through your patches, but it is still not
> clear to me what metrics you use to determine whether a sched group is
> fully utilized or if it can be used for packing more tasks. Is it based on
> nr_running or PJT's tracked load or both? How is the threshold defined?

Thanks review, Morten!

cpu utilisation = rq->util * (rq->nr_running? rq->running : 1),
here: rq->util = running time / whole period.

If nr_running == 2, util == 99%, the potential max 'utilisation' is 99 *
2 = 198, because both of tasks may has the possibility to run full time.

group utils = Sum of all cpu's util,
like a 2 LCPU group, A nr_running is 0, B cpu util is 99%, and has 3 tasks,
So, the group utils = A'util + 99 * 3, that is bigger than threshold =
99% * 2.

The above calculation bias to performance, and that is our purpose.

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-09 Thread Morten Rasmussen
Hi Alex,

On Sat, Jan 05, 2013 at 08:37:29AM +, Alex Shi wrote:
> The patch set base on Linus tree, includes 3 parts,
> 1, bug fix and fork/wake balancing clean up. patch 1~6,
> the first patch remove one domain level. patch 2~6 simplified fork/wake
> balancing, it can increase 10+% hackbench performance on our 4 sockets
> SNB EP machine.
> 
> V3 change:
> a, added the first patch to remove one domain level on x86 platform.
> b, some small changes according to Namhyung Kim's comments, thanks!
> 
> 2, bug fix for load average and implement it into LB, patch 7~12,
> That using load average in load balancing, with a initial runnable load
> value bug fix.
> 
> V3 change:
> a, use rq->cfs.runnable_load_avg as cpu load not
> rq->avg.load_avg_contrib, since the latter need much time to accumulate
> for new forked task,
> b, a build issue fixed with Namhyung Kim's reminder.
> 
> 3, power awareness scheduling, patch 13~22,
> The subset implement my previous power aware scheduling proposal:
> https://lkml.org/lkml/2012/8/13/139
> It defines 2 new power aware policy balance and powersaving, and then
> try to spread or pack tasks on each of sched group level according the
> different scheduler policy. That can save much power when task number in
> system is no more then LCPU number.

Interesting stuff. I have read through your patches, but it is still not
clear to me what metrics you use to determine whether a sched group is
fully utilized or if it can be used for packing more tasks. Is it based on
nr_running or PJT's tracked load or both? How is the threshold defined?

Best regards,
Morten

> 
> V3 change:
> a, engaged nr_running in max potential utils consideration in periodic
> power balancing.
> b, try exec/wake small tasks on running cpu not idle cpu.
> 
> Thanks comments on previous version. and Any more comments are appreciated!
> 
> -- Thanks Alex
> 
> --
> 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  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-09 Thread Morten Rasmussen
Hi Alex,

On Sat, Jan 05, 2013 at 08:37:29AM +, Alex Shi wrote:
 The patch set base on Linus tree, includes 3 parts,
 1, bug fix and fork/wake balancing clean up. patch 1~6,
 the first patch remove one domain level. patch 2~6 simplified fork/wake
 balancing, it can increase 10+% hackbench performance on our 4 sockets
 SNB EP machine.
 
 V3 change:
 a, added the first patch to remove one domain level on x86 platform.
 b, some small changes according to Namhyung Kim's comments, thanks!
 
 2, bug fix for load average and implement it into LB, patch 7~12,
 That using load average in load balancing, with a initial runnable load
 value bug fix.
 
 V3 change:
 a, use rq-cfs.runnable_load_avg as cpu load not
 rq-avg.load_avg_contrib, since the latter need much time to accumulate
 for new forked task,
 b, a build issue fixed with Namhyung Kim's reminder.
 
 3, power awareness scheduling, patch 13~22,
 The subset implement my previous power aware scheduling proposal:
 https://lkml.org/lkml/2012/8/13/139
 It defines 2 new power aware policy balance and powersaving, and then
 try to spread or pack tasks on each of sched group level according the
 different scheduler policy. That can save much power when task number in
 system is no more then LCPU number.

Interesting stuff. I have read through your patches, but it is still not
clear to me what metrics you use to determine whether a sched group is
fully utilized or if it can be used for packing more tasks. Is it based on
nr_running or PJT's tracked load or both? How is the threshold defined?

Best regards,
Morten

 
 V3 change:
 a, engaged nr_running in max potential utils consideration in periodic
 power balancing.
 b, try exec/wake small tasks on running cpu not idle cpu.
 
 Thanks comments on previous version. and Any more comments are appreciated!
 
 -- Thanks Alex
 
 --
 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  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
 

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-09 Thread Alex Shi

 3, power awareness scheduling, patch 13~22,
 The subset implement my previous power aware scheduling proposal:
 https://lkml.org/lkml/2012/8/13/139
 It defines 2 new power aware policy balance and powersaving, and then
 try to spread or pack tasks on each of sched group level according the
 different scheduler policy. That can save much power when task number in
 system is no more then LCPU number.
 
 Interesting stuff. I have read through your patches, but it is still not
 clear to me what metrics you use to determine whether a sched group is
 fully utilized or if it can be used for packing more tasks. Is it based on
 nr_running or PJT's tracked load or both? How is the threshold defined?

Thanks review, Morten!

cpu utilisation = rq-util * (rq-nr_running? rq-running : 1),
here: rq-util = running time / whole period.

If nr_running == 2, util == 99%, the potential max 'utilisation' is 99 *
2 = 198, because both of tasks may has the possibility to run full time.

group utils = Sum of all cpu's util,
like a 2 LCPU group, A nr_running is 0, B cpu util is 99%, and has 3 tasks,
So, the group utils = A'util + 99 * 3, that is bigger than threshold =
99% * 2.

The above calculation bias to performance, and that is our purpose.

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-05 Thread Alex Shi
The patch set base on Linus tree, includes 3 parts,
1, bug fix and fork/wake balancing clean up. patch 1~6,
the first patch remove one domain level. patch 2~6 simplified fork/wake
balancing, it can increase 10+% hackbench performance on our 4 sockets
SNB EP machine.

V3 change:
a, added the first patch to remove one domain level on x86 platform.
b, some small changes according to Namhyung Kim's comments, thanks!

2, bug fix for load average and implement it into LB, patch 7~12,
That using load average in load balancing, with a initial runnable load
value bug fix.

V3 change:
a, use rq->cfs.runnable_load_avg as cpu load not
rq->avg.load_avg_contrib, since the latter need much time to accumulate
for new forked task,
b, a build issue fixed with Namhyung Kim's reminder.

3, power awareness scheduling, patch 13~22,
The subset implement my previous power aware scheduling proposal:
https://lkml.org/lkml/2012/8/13/139
It defines 2 new power aware policy balance and powersaving, and then
try to spread or pack tasks on each of sched group level according the
different scheduler policy. That can save much power when task number in
system is no more then LCPU number.

V3 change:
a, engaged nr_running in max potential utils consideration in periodic
power balancing.
b, try exec/wake small tasks on running cpu not idle cpu.

Thanks comments on previous version. and Any more comments are appreciated!

-- Thanks Alex

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V3 0/22] sched: simplified fork, enable load average into LB and power awareness scheduling

2013-01-05 Thread Alex Shi
The patch set base on Linus tree, includes 3 parts,
1, bug fix and fork/wake balancing clean up. patch 1~6,
the first patch remove one domain level. patch 2~6 simplified fork/wake
balancing, it can increase 10+% hackbench performance on our 4 sockets
SNB EP machine.

V3 change:
a, added the first patch to remove one domain level on x86 platform.
b, some small changes according to Namhyung Kim's comments, thanks!

2, bug fix for load average and implement it into LB, patch 7~12,
That using load average in load balancing, with a initial runnable load
value bug fix.

V3 change:
a, use rq-cfs.runnable_load_avg as cpu load not
rq-avg.load_avg_contrib, since the latter need much time to accumulate
for new forked task,
b, a build issue fixed with Namhyung Kim's reminder.

3, power awareness scheduling, patch 13~22,
The subset implement my previous power aware scheduling proposal:
https://lkml.org/lkml/2012/8/13/139
It defines 2 new power aware policy balance and powersaving, and then
try to spread or pack tasks on each of sched group level according the
different scheduler policy. That can save much power when task number in
system is no more then LCPU number.

V3 change:
a, engaged nr_running in max potential utils consideration in periodic
power balancing.
b, try exec/wake small tasks on running cpu not idle cpu.

Thanks comments on previous version. and Any more comments are appreciated!

-- Thanks Alex

--
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  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/