mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PM:EM: fix wrong utilization estimation in em_cpu_energy()
@ 2024-04-04 10:42 Vincent Guittot
  2024-04-04 11:05 ` Lukasz Luba
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Guittot @ 2024-04-04 10:42 UTC (permalink / raw)
  To: lukasz.luba, rafael, linux-kernel, linux-pm, dietmar.eggemann
  Cc: rui.zhang, amit.kucheria, amit.kachhap, daniel.lezcano,
	viresh.kumar, len.brown, pavel, mhiramat, qyousef, wvw,
	xuewen.yan94, Vincent Guittot

Commit 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division")
has added back map_util_perf() in em_cpu_energy() computation which has
been removed with the rework of scheduler/cpufreq interface.
This is wrong because sugov_effective_cpu_perf() already takes care of
mapping the utilization to a performance level.

Fixes: 1b600da51073 ("PM: EM: Optimize em_cpu_energy() and remove division")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 include/linux/energy_model.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
index 770755df852f..70cd7258cd29 100644
--- a/include/linux/energy_model.h
+++ b/include/linux/energy_model.h
@@ -245,7 +245,6 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
 	 * max utilization to the allowed CPU capacity before calculating
 	 * effective performance.
 	 */
-	max_util = map_util_perf(max_util);
 	max_util = min(max_util, allowed_cpu_cap);
 
 	/*
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-04 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 10:42 [PATCH] PM:EM: fix wrong utilization estimation in em_cpu_energy() Vincent Guittot
2024-04-04 11:05 ` Lukasz Luba
2024-04-04 19:05   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®