sched: simplified fork, release load avg and power awareness scheduling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest18 patches 69 repliesIn review
- v322 patches 68 repliesSuperseded
- v118 patches 37 repliesSuperseded
Changes in v4 from the cover letter
a, remove runnable log avg using in balancing.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | sched: set SD_PREFER_SIBLING on MC domain to reduce a domain levelinclude/ | +1 | 5 replies | |
| 2/18 | sched: select_task_rq_fair clean upkernel/ | +0 | 2 replies | |
| 3/18 | sched: fix find_idlest_group mess logicalkernel/ | +9 | 2 replies | |
| 4/18 | sched: don't need go to smaller sched domainkernel/ | +2 | 0 replies | |
| 5/18 | sched: quicker balancing on fork/exec/wakekernel/ | +1 | 5 replies | |
| 6/18 | sched: give initial value for runnable avg of sched entities.kernel/ | +2 | 1 reply | |
| 7/18 | sched: set initial load avg of new forked taskinclude/ kernel/ kernel/ | +11 | 7 replies | |
| 8/18 | Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"include/ kernel/ kernel/ +1 more | +5 | 4 replies | |
| 9/18 | sched: add sched_policies in kernelkernel/ kernel/ | +8 | 2 replies | |
| 10/18 | sched: add sysfs interface for sched_policy selectionDocumentation/ kernel/ | +101 | 0 replies | |
| 11/18 | sched: log the cpu utilization at rqkernel/ kernel/ kernel/ | +9 | 2 replies | |
| 12/18 | sched: add power aware scheduling in fork/exec/wakekernel/ | +179 | 0 replies | |
| 13/18 | sched: packing small tasks in wake/exec balancingkernel/ | +60 | 0 replies | |
| 14/18 | sched: add power/performance balance allowed flagkernel/ | +4 | 0 replies | |
| 15/18 | sched: pull all tasks from source groupkernel/ | +5 | 0 replies | |
| 16/18 | sched: don't care if the local group has capacitykernel/ | +5 | 0 replies | |
| 17/18 | sched: power aware load balance,kernel/ | +124 | 0 replies | |
| 18/18 | sched: lazy power balanceinclude/ kernel/ | +55 | 0 replies |
Reviews trailers per patch
4 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Preeti U Murthy |
|---|---|
| 1/18 | |
| 2/18 | R-b |
| 3/18 | R-b |
| 4/18 | R-b |
| 5/18 | |
| 6/18 | |
| 7/18 | R-b |
| 8/18 | |
| 9/18 | |
| 10/18 | |
| 11/18 | |
| 12/18 | |
| 13/18 | |
| 14/18 | |
| 15/18 | |
| 16/18 | |
| 17/18 | |
| 18/18 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch v4 0/18] sched: simplified fork, release load avg and power awareness scheduling
Since the runnable info needs 345ms to accumulate, balancing doesn't do well for many tasks burst waking. After talking with Mike Galbraith, we are agree to just use runnable avg in power friendly scheduling and keep current instant load in performance scheduling for low latency.
So the biggest change in this version is removing runnable load avg in balance and just using runnable data in power balance.
The patchset bases on Linus' tree, includes 3 parts,
** 1, bug fix and fork/wake balancing clean up. patch 1~5,
----------------------
the first patch remove one domain level. patch 2~5 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 of load avg and remove the CONFIG_FAIR_GROUP_SCHED limit
----------------------
patch 6~8, That using runnable avg in load balancing, with two initial runnable variables fix.
V4 change:
a, remove runnable log avg using in balancing.
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 9~18.
----------------------
The subset implement/consummate the rough 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 sched groups level according the different scheduler policy. That can save much power when task number in system is no more then LCPU number.
As mentioned in the power aware scheduler proposal, Power aware scheduling has 2 assumptions:
1, race to idle is helpful for power saving
2, pack tasks on less sched_groups will reduce power consumption
The first assumption make performance policy take over scheduling when system busy.
The second assumption make power aware scheduling try to move disperse tasks into fewer groups until that groups are full of tasks.
Some power testing data is in the last 2 patches.
V4 change:
a, fix few bugs and clean up code according to Morten Rasmussen, Mike Galbraith and Namhyung Kim. Thanks!
b, take Morten's suggestion to set different criteria for different policy in small task packing.
c, shorter latency in power aware scheduling.
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.
V2 change:
a, add lazy power scheduling to deal with kbuild like benchmark.
Thanks Fengguang Wu for the build testing of this patchset!
Any comments are appreciated!
-- Thanks Alex
[patch v4 01/18] sched: set SD_PREFER_SIBLING on MC domain to reduce [patch v4 02/18] sched: select_task_rq_fair clean up [patch v4 03/18] sched: fix find_idlest_group mess logical [patch v4 04/18] sched: don't need go to smaller sched domain [patch v4 05/18] sched: quicker balancing on fork/exec/wake [patch v4 06/18] sched: give initial value for runnable avg of sched [patch v4 07/18] sched: set initial load avg of new forked task [patch v4 08/18] Revert "sched: Introduce temporary FAIR_GROUP_SCHED [patch v4 09/18] sched: add sched_policies in kernel [patch v4 10/18] sched: add sysfs interface for sched_policy [patch v4 11/18] sched: log the cpu utilization at rq [patch v4 12/18] sched: add power aware scheduling in fork/exec/wake [patch v4 13/18] sched: packing small tasks in wake/exec balancing [patch v4 14/18] sched: add power/performance balance allowed flag [patch v4 15/18] sched: pull all tasks from source group [patch v4 16/18] sched: don't care if the local group has capacity [patch v4 17/18] sched: power aware load balance,
[patch v4 18/18] sched: lazy power balance