Skip to content

Commit 015f569

Browse files
lukaszluba-armrafaeljw
authored andcommitted
Documentation: EM: Add artificial EM registration description
Add description about new artificial EM registration and use cases. Update also the documentation with the new .get_cost() callback description and usage. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 1685748 commit 015f569

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Documentation/power/energy-model.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,26 @@ allows a platform to register EM power values which are reflecting total power
123123
(static + dynamic). These power values might be coming directly from
124124
experiments and measurements.
125125

126+
Registration of 'artificial' EM
127+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128+
129+
There is an option to provide a custom callback for drivers missing detailed
130+
knowledge about power value for each performance state. The callback
131+
.get_cost() is optional and provides the 'cost' values used by the EAS.
132+
This is useful for platforms that only provide information on relative
133+
efficiency between CPU types, where one could use the information to
134+
create an abstract power model. But even an abstract power model can
135+
sometimes be hard to fit in, given the input power value size restrictions.
136+
The .get_cost() allows to provide the 'cost' values which reflect the
137+
efficiency of the CPUs. This would allow to provide EAS information which
138+
has different relation than what would be forced by the EM internal
139+
formulas calculating 'cost' values. To register an EM for such platform, the
140+
driver must set the flag 'milliwatts' to 0, provide .get_power() callback
141+
and provide .get_cost() callback. The EM framework would handle such platform
142+
properly during registration. A flag EM_PERF_DOMAIN_ARTIFICIAL is set for such
143+
platform. Special care should be taken by other frameworks which are using EM
144+
to test and treat this flag properly.
145+
126146
Registration of 'simple' EM
127147
~~~~~~~~~~~~~~~~~~~~~~~~~~~
128148

0 commit comments

Comments
 (0)