Skip to content

Commit 54b603f

Browse files
Yaxiong Tianrafaeljw
authored andcommitted
PM: EM: Fix incorrect description of the cost field in struct em_perf_state
Due to commit 1b600da ("PM: EM: Optimize em_cpu_energy() and remove division"), the logic for energy consumption calculation has been modified. The actual calculation of cost is 10 * power * max_frequency / frequency instead of power * max_frequency / frequency. Therefore, the comment for cost has been updated to reflect the correct content. Fixes: 1b600da ("PM: EM: Optimize em_cpu_energy() and remove division") Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> [ rjw: Added Fixes: tag ] Link: https://patch.msgid.link/20251230061534.816894-1-tianyaxiong@kylinos.cn Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9ace475 commit 54b603f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/energy_model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @power: The power consumed at this level (by 1 CPU or by a registered
1919
* device). It can be a total power: static and dynamic.
2020
* @cost: The cost coefficient associated with this level, used during
21-
* energy calculation. Equal to: power * max_frequency / frequency
21+
* energy calculation. Equal to: 10 * power * max_frequency / frequency
2222
* @flags: see "em_perf_state flags" description below.
2323
*/
2424
struct em_perf_state {

0 commit comments

Comments
 (0)