@@ -14,8 +14,8 @@ subsystems willing to use that information to make energy-aware decisions.
1414The source of the information about the power consumed by devices can vary greatly
1515from one platform to another. These power costs can be estimated using
1616devicetree data in some cases. In others, the firmware will know better.
17- Alternatively, userspace might be best positioned. And so on. In order to avoid
18- each and every client subsystem to re-implement support for each and every
17+ Alternatively, userspace might be best positioned. In order to avoid
18+ having each and every client subsystem re-implement support for each and every
1919possible source of information on its own, the EM framework intervenes as an
2020abstraction layer which standardizes the format of power cost tables in the
2121kernel, hence enabling to avoid redundant work.
@@ -32,7 +32,7 @@ be found in the Intelligent Power Allocation in
3232Documentation/driver-api/thermal/power_allocator.rst.
3333Kernel subsystems might implement automatic detection to check whether EM
3434registered devices have inconsistent scale (based on EM internal flag).
35- Important thing to keep in mind is that when the power values are expressed in
35+ An important thing to keep in mind is that when the power values are expressed in
3636an 'abstract scale' deriving real energy in micro-Joules would not be possible.
3737
3838The figure below depicts an example of drivers (Arm-specific here, but the
@@ -82,7 +82,7 @@ using kref mechanism. The device driver which provided the new EM at runtime,
8282should call EM API to free it safely when it's no longer needed. The EM
8383framework will handle the clean-up when it's possible.
8484
85- The kernel code which want to modify the EM values is protected from concurrent
85+ The kernel code which wants to modify the EM values is protected from concurrent
8686access using a mutex. Therefore, the device driver code must run in sleeping
8787context when it tries to modify the EM.
8888
@@ -113,7 +113,7 @@ Registration of 'advanced' EM
113113~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114114
115115The 'advanced' EM gets its name due to the fact that the driver is allowed
116- to provide more precised power model. It's not limited to some implemented math
116+ to provide a more precise power model. It's not limited to some implemented math
117117formula in the framework (like it is in 'simple' EM case). It can better reflect
118118the real power measurements performed for each performance state. Thus, this
119119registration method should be preferred in case considering EM static power
@@ -172,7 +172,7 @@ Registration of 'simple' EM
172172~~~~~~~~~~~~~~~~~~~~~~~~~~~
173173
174174The 'simple' EM is registered using the framework helper function
175- cpufreq_register_em_with_opp(). It implements a power model which is tight to
175+ cpufreq_register_em_with_opp(). It implements a power model which is tied to a
176176math formula::
177177
178178 Power = C * V^2 * f
@@ -251,7 +251,7 @@ It returns the 'struct em_perf_state' pointer which is an array of performance
251251states in ascending order.
252252This function must be called in the RCU read lock section (after the
253253rcu_read_lock()). When the EM table is not needed anymore there is a need to
254- call rcu_real_unlock (). In this way the EM safely uses the RCU read section
254+ call rcu_read_unlock (). In this way the EM safely uses the RCU read section
255255and protects the users. It also allows the EM framework to manage the memory
256256and free it. More details how to use it can be found in Section 3.2 in the
257257example driver.
0 commit comments