energy-model.rst (75a3a99a5a9886af13be44e640cb415ebda80db2) | energy-model.rst (015f569c4649fe9595ed465dc8e4301d34937f8f) |
---|---|
1.. SPDX-License-Identifier: GPL-2.0 2 3======================= 4Energy Model of devices 5======================= 6 71. Overview 8----------- --- 109 unchanged lines hidden (view full) --- 118 119The EM can also be registered using OPP framework and information in DT 120"operating-points-v2". Each OPP entry in DT can be extended with a property 121"opp-microwatt" containing micro-Watts power value. This OPP DT property 122allows a platform to register EM power values which are reflecting total power 123(static + dynamic). These power values might be coming directly from 124experiments and measurements. 125 | 1.. SPDX-License-Identifier: GPL-2.0 2 3======================= 4Energy Model of devices 5======================= 6 71. Overview 8----------- --- 109 unchanged lines hidden (view full) --- 118 119The EM can also be registered using OPP framework and information in DT 120"operating-points-v2". Each OPP entry in DT can be extended with a property 121"opp-microwatt" containing micro-Watts power value. This OPP DT property 122allows a platform to register EM power values which are reflecting total power 123(static + dynamic). These power values might be coming directly from 124experiments and measurements. 125 |
126Registration of 'artificial' EM 127~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 129There is an option to provide a custom callback for drivers missing detailed 130knowledge about power value for each performance state. The callback 131.get_cost() is optional and provides the 'cost' values used by the EAS. 132This is useful for platforms that only provide information on relative 133efficiency between CPU types, where one could use the information to 134create an abstract power model. But even an abstract power model can 135sometimes be hard to fit in, given the input power value size restrictions. 136The .get_cost() allows to provide the 'cost' values which reflect the 137efficiency of the CPUs. This would allow to provide EAS information which 138has different relation than what would be forced by the EM internal 139formulas calculating 'cost' values. To register an EM for such platform, the 140driver must set the flag 'milliwatts' to 0, provide .get_power() callback 141and provide .get_cost() callback. The EM framework would handle such platform 142properly during registration. A flag EM_PERF_DOMAIN_ARTIFICIAL is set for such 143platform. Special care should be taken by other frameworks which are using EM 144to test and treat this flag properly. 145 |
|
126Registration of 'simple' EM 127~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 129The 'simple' EM is registered using the framework helper function 130cpufreq_register_em_with_opp(). It implements a power model which is tight to 131math formula:: 132 133 Power = C * V^2 * f --- 91 unchanged lines hidden --- | 146Registration of 'simple' EM 147~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 149The 'simple' EM is registered using the framework helper function 150cpufreq_register_em_with_opp(). It implements a power model which is tight to 151math formula:: 152 153 Power = C * V^2 * f --- 91 unchanged lines hidden --- |