mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-09-23 13:13:40 +08:00
scheduler: Energy Aware Scheduling
This commit is contained in:
@@ -48,7 +48,8 @@
|
||||
> 感谢知友 [@costa](https://www.zhihu.com/people/78ceb98e7947731dc06063f682cf9640) 提供无水印题图)
|
||||
|
||||
|
||||
预计内容目录:
|
||||
# 2 内容目录
|
||||
-------
|
||||
|
||||
|
||||
| 内容 | GITHUB |
|
||||
|
||||
@@ -505,7 +505,7 @@ NUMA 机器一个重要特性就是不同 node 之间的内存访问速度有差
|
||||
|
||||
|
||||
|
||||
# 1.9 **CPU 调度与节能**
|
||||
# 1.9 **调度与节能**
|
||||
-------
|
||||
|
||||
|
||||
@@ -516,6 +516,58 @@ NUMA 机器一个重要特性就是不同 node 之间的内存访问速度有差
|
||||
在前不久, 一个新的 patch 被提交到 Linux 内核开发邮件列表, 这个问题也许有了新的眉目, 到时再来更新此小节.可阅读此文章: [Steps toward power-aware scheduling [LWN.net]](https://lwn.net/Articles/655479/)
|
||||
|
||||
|
||||
## 1.9.1 小任务封包
|
||||
-------
|
||||
|
||||
小任务封包(Small Task Packing) 是内核调度特性中少数几个隔几年就会被人换个马甲发出来的特性之一.
|
||||
|
||||
早在 2012 年, Linaro 的 Vincent Guittot 发出了一版 [Small-task packing](https://lwn.net/Articles/520857) 的补丁, 通过将负载较轻的任务打包在尽量少的 CPU 上, 从而在保证系统性能的前提下, 尽可能的降低功耗.
|
||||
该补丁最终发到 v5 版本 [PatchWork](https://lore.kernel.org/patchwork/cover/414759), [lkml](https://lkml.org/lkml/2013/10/18/121), [git-sched-packing-small-tasks-v5](http://git.linaro.org/people/vincent.guittot/kernel.git/log/?h=sched-packing-small-tasks-v5) 后, 没有了下文.
|
||||
|
||||
但是请大家记住这个特性, 这个特性将在后面的特性中不断被提及并实现. 它作为一个先驱者, 为终端功耗场景在调度领域做了最初的一次尝试. 自此开始调度领域一场旷日持久的性能 vs 功耗的战役被打响.
|
||||
|
||||
|
||||
## 1.9.2 能耗感知的调度器
|
||||
-------
|
||||
|
||||
在 Linaro 开发小任务封包的同时, 2012 年 Intel 的 Alex Shi 发起的讨论中, 提出了更高大上的概念[**能耗感知的调度器**](https://lkml.org/lkml/2012/8/13/139), 功耗和性能本身就是一个矛盾的统一体, 因此由于此特性节省的功耗和降低的性能不成正比, 因此在发到 v7 [PatchWork](https://lore.kernel.org/patchwork/cover/370834) 之后也寿终正寝.
|
||||
|
||||
|
||||
功耗感知的调度器是如此的新颖, 以至于 2013 年 10 月, 致力于 ANDROID 调度器优化的 Morten Rasmussen [sched: Power scheduler design proposal](https://lore.kernel.org/patchwork/cover/391530) 也提出了自己的想法, 在发到了 [v2 PatchWork](https://lore.kernel.org/patchwork/cover/412619),在这之前他刚发出了他 HMP 的补丁.
|
||||
|
||||
接着 2014 年, Preeti U Murthy 在总结了 Alex Shi 的经验之后, 接着完善了能耗感知调度器的设计, 但是由于缺少热度, 这个特性最终止步 v2 [Power Scheduler Design](https://lore.kernel.org/patchwork/cover/491059) 版本.
|
||||
|
||||
但是不可否认, 能耗感知的调度器提出了很多新颖的想法, 他将会后来的调度器知名一个新的方向.
|
||||
|
||||
|
||||
>2014/08/27, 2014Jonathan Corbet, [The power-aware scheduling miniconference](https://lwn.net/Articles/609561)
|
||||
>
|
||||
>2015/08/25, By Jonathan Corbet, [Steps toward power-aware scheduling](https://lwn.net/Articles/655479)
|
||||
>
|
||||
>[Another attempt at power-aware scheduling](https://lwn.net/Articles/600419)
|
||||
|
||||
## 1.9.3 IKS -> HMP -> EAS
|
||||
-------
|
||||
|
||||
|
||||
[The power-aware scheduling mini-summit](https://lwn.net/Articles/571414)
|
||||
|
||||
ARM 的 Morten Rasmussen 一直致力于ANDROID 调度器优化的:
|
||||
|
||||
* 最初版本的 IKS 调度器, [ELC: In-kernel switcher for big.LITTLE](https://lwn.net/Articles/539840)
|
||||
|
||||
* 以及后来先进的 HMP 调度器 [LC-Asia: A big LITTLE MP update](https://lwn.net/Articles/541005), 虽然我们称呼他是一个调度器, 但是其实他的策略只是一个**进程放置(Task Placement, 请原谅我的这个翻译, 很抱歉我实在不知道翻译成什么好, 如果您有什么好的建议, 请联系我)** 的策略. [sched: Task placement for heterogeneous MP systems](https://lore.kernel.org/patchwork/cover/327745)
|
||||
|
||||
* 直到看到了能耗感知调度器, 忽然眼前有了光, Morten 充分借鉴了能耗感知调度器的思想, 提出了自己的想法[Another attempt at power-aware scheduling](https://lwn.net/Articles/600419), 最终发布到 v2 版本 [Power-aware scheduling v2](https://lore.kernel.org/patchwork/cover/412619).
|
||||
|
||||
* 在 [Power-aware scheduling v2](https://lore.kernel.org/patchwork/cover/412619) 发布之后 版本之后. Morten 有了更多的奇思妙想, 提出了能耗模型(energy cost model) 的雏形, 以及 energy diff 的思想, 从此一发不可收拾. 可以认为这个就是 EAS 最早的雏形, 并最终发到了 2015/07/07 v5 版本 [sched: Energy cost model for energy-aware scheduling](https://lore.kernel.org/patchwork/cover/576661).
|
||||
|
||||
* EAS 带来了划时代的想法, 最终 Quentin Perret 接手了 Morten Rasmussen 的工作, 最终在 2018/10/03 v10 版本将 EAS 合入主线 [https://lore.kernel.org/patchwork/cover/1020432/](https://lore.kernel.org/patchwork/cover/1020432)
|
||||
|
||||
|
||||
## 1.9.4
|
||||
[scheduler-driven cpu frequency selection](https://lwn.net/Articles/649593)
|
||||
|
||||
|
||||
**引用: **
|
||||
|
||||
|
||||
Reference in New Issue
Block a user