Documentation/translations/zh_CN/scheduler/sched-energy.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/scheduler/sched-energy.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/scheduler/sched-energy.rst- Extension
.rst- Size
- 17749 bytes
- Lines
- 352
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: Documentation/scheduler/sched-energy.rst
:翻译:
唐艺舟 Tang Yizhou <tangyeechou@gmail.com>
============
能量感知调度
============
1. 简介
-------
能量感知调度(EAS)使调度器有能力预测其决策对CPU所消耗的能量的影响。EAS依靠
一个能量模型(EM)来为每个任务选择一个节能的CPU,同时最小化对吞吐率的影响。
本文档致力于介绍介绍EAS是如何工作的,它背后的主要设计决策是什么,以及使其运行
所需的条件细节。
在进一步阅读之前,请注意,在撰写本文时::
/!\ EAS不支持对称CPU拓扑的平台 /!\
EAS只在异构CPU拓扑结构(如Arm大小核,big.LITTLE)上运行。因为在这种情况下,
通过调度来节约能量的潜力是最大的。
EAS实际使用的EM不是由调度器维护的,而是一个专门的框架。关于这个框架的细节和
它提供的内容,请参考其文档(见Documentation/power/energy-model.rst)。
2. 背景和术语
-------------
从一开始就说清楚定义:
- 能量 = [焦耳] (比如供电设备上的电池提供的资源)
- 功率 = 能量/时间 = [焦耳/秒] = [瓦特]
EAS的目标是最小化能量消耗,同时仍能将工作完成。也就是说,我们要最大化::
性能 [指令数/秒]
----------------
功率 [瓦特]
它等效于最小化::
能量 [焦耳]
-----------
指令数
同时仍然获得“良好”的性能。当前调度器只考虑性能目标,因此该式子本质上是一个
可选的优化目标,它同时考虑了两个目标:能量效率和性能。
引入EM的想法是为了让调度器评估其决策的影响,而不是盲目地应用可能仅在部分
平台有正面效果的节能技术。同时,EM必须尽可能的简单,以最小化调度器的时延
影响。
简而言之,EAS改变了CFS任务分配给CPU的方式。当调度器决定一个任务应该在哪里
运行时(在唤醒期间),EM被用来在不损害系统吞吐率的情况下,从几个较好的候选
CPU中挑选一个经预测能量消耗最优的CPU。EAS的预测依赖于对平台拓扑结构特定元素
的了解,包括CPU的“算力”,以及它们各自的能量成本。
3. 拓扑信息
-----------
EAS(以及调度器的剩余部分)使用“算力”的概念来区分不同计算吞吐率的CPU。一个
CPU的“算力”代表了它在最高频率下运行时能完成的工作量,且这个值是相对系统中
算力最大的CPU而言的。算力值被归一化为1024以内,并且可与由实体负载跟踪
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.