energy-model.rst (0ea8a56de21be24cb79abb03dee79aabcd60a316) | energy-model.rst (5a64f775691647c242aa40d34f3512e7b179a921) |
---|---|
1.. SPDX-License-Identifier: GPL-2.0 2 3======================= 4Energy Model of devices 5======================= 6 71. Overview 8----------- --- 6 unchanged lines hidden (view full) --- 15from one platform to another. These power costs can be estimated using 16devicetree data in some cases. In others, the firmware will know better. 17Alternatively, userspace might be best positioned. And so on. In order to avoid 18each and every client subsystem to re-implement support for each and every 19possible source of information on its own, the EM framework intervenes as an 20abstraction layer which standardizes the format of power cost tables in the 21kernel, hence enabling to avoid redundant work. 22 | 1.. SPDX-License-Identifier: GPL-2.0 2 3======================= 4Energy Model of devices 5======================= 6 71. Overview 8----------- --- 6 unchanged lines hidden (view full) --- 15from one platform to another. These power costs can be estimated using 16devicetree data in some cases. In others, the firmware will know better. 17Alternatively, userspace might be best positioned. And so on. In order to avoid 18each and every client subsystem to re-implement support for each and every 19possible source of information on its own, the EM framework intervenes as an 20abstraction layer which standardizes the format of power cost tables in the 21kernel, hence enabling to avoid redundant work. 22 |
23The power values might be expressed in milli-Watts or in an 'abstract scale'. 24Multiple subsystems might use the EM and it is up to the system integrator to 25check that the requirements for the power value scale types are met. An example 26can be found in the Energy-Aware Scheduler documentation 27Documentation/scheduler/sched-energy.rst. For some subsystems like thermal or 28powercap power values expressed in an 'abstract scale' might cause issues. 29These subsystems are more interested in estimation of power used in the past, 30thus the real milli-Watts might be needed. An example of these requirements can 31be found in the Intelligent Power Allocation in 32Documentation/driver-api/thermal/power_allocator.rst. 33Important thing to keep in mind is that when the power values are expressed in 34an 'abstract scale' deriving real energy in milli-Joules would not be possible. 35 |
|
23The figure below depicts an example of drivers (Arm-specific here, but the 24approach is applicable to any architecture) providing power costs to the EM 25framework, and interested clients reading the data from it:: 26 27 +---------------+ +-----------------+ +---------------+ 28 | Thermal (IPA) | | Scheduler (EAS) | | Other | 29 +---------------+ +-----------------+ +---------------+ 30 | | em_cpu_energy() | --- 132 unchanged lines hidden --- | 36The figure below depicts an example of drivers (Arm-specific here, but the 37approach is applicable to any architecture) providing power costs to the EM 38framework, and interested clients reading the data from it:: 39 40 +---------------+ +-----------------+ +---------------+ 41 | Thermal (IPA) | | Scheduler (EAS) | | Other | 42 +---------------+ +-----------------+ +---------------+ 43 | | em_cpu_energy() | --- 132 unchanged lines hidden --- |