CFS Bandwidth Control v7.1
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest17 patches 29 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | sched: (fixlet) dont update shares twice on on_rq parentkernel/ | +3 | 1 reply | |
| 2/17 | sched: hierarchical task accounting for SCHED_OTHERkernel/ kernel/ kernel/ +1 more | +16 | 0 replies | |
| 3/17 | sched: introduce primitives to account for CFS bandwidth trackinginit/ kernel/ kernel/ | +219 | 2 replies | |
| 4/17 | sched: validate CFS quota hierarchieskernel/ | +96 | 0 replies | |
| 5/17 | sched: accumulate per-cfs_rq cpu usage and charge against bandwidthinclude/ kernel/ kernel/ +1 more | +84 | 0 replies | |
| 6/17 | sched: add a timer to handle CFS bandwidth refreshkernel/ kernel/ | +124 | 0 replies | |
| 7/17 | sched: expire invalid runtimekernel/ kernel/ | +82 | 0 replies | |
| 8/17 | sched: add support for throttling group entitieskernel/ kernel/ | +92 | 0 replies | |
| 9/17 | sched: add support for unthrottling group entitieskernel/ kernel/ | +127 | 0 replies | |
| 10/17 | sched: allow for positional tg_tree walkskernel/ | +39 | 0 replies | |
| 11/17 | sched: prevent interactions with throttled entitieskernel/ kernel/ | +94 | 0 replies | |
| 12/17 | sched: prevent buddy interactions with throttled entitieskernel/ | +17 | 0 replies | |
| 13/17 | sched: migrate throttled tasks on HOTPLUGkernel/ | +27 | 0 replies | |
| 14/17 | sched: throttle entities exceeding their allowed bandwidthkernel/ | +49 | 0 replies | |
| 15/17 | sched: add exports tracking cfs bandwidth control statisticskernel/ kernel/ | +28 | 0 replies | |
| 16/17 | sched: return unused runtime on group dequeuekernel/ kernel/ | +119 | 0 replies | |
| 17/17 | sched: add documentation for bandwidth controlDocumentation/ | +122 | 0 replies |
Reviews trailers per patch
10 of 17 patches have a Reviewed-by or Acked-by.
| Patch | Hidetoshi Seto |
|---|---|
| 1/17 | |
| 2/17 | R-b |
| 3/17 | R-b |
| 4/17 | |
| 5/17 | R-b |
| 6/17 | R-b |
| 7/17 | R-b |
| 8/17 | |
| 9/17 | R-b |
| 10/17 | R-b |
| 11/17 | R-b |
| 12/17 | |
| 13/17 | R-b |
| 14/17 | |
| 15/17 | R-b |
| 16/17 | |
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 00/17] CFS Bandwidth Control v7.1
Hi all,
Please find attached an incremental revision on v7 of bandwidth control.
The only real functional change is an improvement to update shares only as we leave a throttled state. The remainder is largely refactoring, expansion of comments, and code clean-up.
Hidetoshi Seto and Hu Tao have been kind enough to run performance benchmarks against v7 measuring the scheduling path overheads versus pipe-test-100k. Results can be found at:
https://lkml.org/lkml/2011/6/24/10
https://lkml.org/lkml/2011/7/4/347
The summary results (from Hu Tao's most recent run) are:
cycles instructions branches
-------------------------------------------------------------------------------------------------------------------
base 7,526,317,497 8,666,579,347 1,771,078,445 +patch, cgroup not enabled 7,610,354,447 (1.12%) 8,569,448,982 (-1.12%) 1,751,675,193 (-0.11%) +patch, 10000000000/1000(quota/period) 7,856,873,327 (4.39%) 8,822,227,540 (1.80%) 1,801,766,182 (1.73%) +patch, 10000000000/10000(quota/period) 7,797,711,600 (3.61%) 8,754,747,746 (1.02%) 1,788,316,969 (0.97%) +patch, 10000000000/100000(quota/period) 7,777,784,384 (3.34%) 8,744,979,688 (0.90%) 1,786,319,566 (0.86%) +patch, 10000000000/1000000(quota/period) 7,802,382,802 (3.67%) 8,755,638,235 (1.03%) 1,788,601,070 (0.99%)
------------------------------------------------------------------------------------------------------------------
Thanks again for running these benchmarks!
Changes:
v7.1
-----------
- We now only explicitly update entity shares as their hierarchy leaves a throttled state. This simplifies shares interactions as all tg->shares logic can now be omitted within a throttled hierarchy. This should also improve the quality of balance observed within Kamalesh's nested cgroup test as we are able to do a bottom-up shares update on unthrottle.
- do_sched_cfs_period_timer() refactored to be linear/readable.
- We now force a period timer restart in tg_set_cfs_bandwidth (before a dramatic decrease in the period length could have induced a period of starvation while we waited for the previous timer to expire). Also avoid a spurious start/restart that existed in the quota == RUNTIME_INF case.
- The above removes the case of bandwidth changing within the period timer which helps with the do_sched_cfs_period_timer() clean-up.
- Fixed potential cfs_b lock nesting on __start_cfs_bandwidth() (In the case that we are racing with call-back startup and not tear-down).
- The load-balancer checks to ensure that we are not moving tasks between throttled hierarchies have been refactored and now check both the src and dest cfs_rqs.
- Buddy isolation cleaned up and moved to its own patch.
- Enabling of throttling deferred later within the series so that load-balancer and buddy protections exist (for stability in bisection).
- Documentation given a once-over for clarity and content.
- General code cleanup & comments improved
Hidetoshi, the following patchsets have changed enough to necessitate tweaking of your Reviewed-by:
[patch 09/18] sched: add support for unthrottling group entities (extensive) [patch 11/18] sched: prevent interactions with throttled entities (update_cfs_shares) [patch 12/18] sched: prevent buddy interactions with throttled entities (new)
Previous postings:
-----------------
v7: http://lkml.org/lkml/2011/6/21/43
v6: http://lkml.org/lkml/2011/5/7/37
v5: http://lkml.org/lkml/2011/3 /22/477
v4: http://lkml.org/lkml/2011/2/23/44
v3: http://lkml.org/lkml/2010/10/12/44
v2: http://lkml.org/lkml/2010/4/28/88
Original posting: http://lkml.org/lkml/2010/2/12/393
Prior approaches: http://lkml.org/lkml/2010/1/5/44 ["CFS Hard limits v5"]
Thanks,
- Paul