From: Lukasz Luba <lukasz.luba@arm.com>
To: Yaxiong Tian <tianyaxiong@kylinos.cn>
Cc: linux-pm@vger.kernel.org, lenb@kernel.org,
linux-kernel@vger.kernel.org, pavel@kernel.org,
rafael@kernel.org
Subject: Re: [PATCH 1/2] PM: EM: Fix incorrect description of the cost field in struct em_perf_state
Date: Tue, 30 Dec 2025 09:35:49 +0000 [thread overview]
Message-ID: <d5ee5e5b-d636-47c7-83e6-b58cab9f4d6e@arm.com> (raw)
In-Reply-To: <20251230061534.816894-1-tianyaxiong@kylinos.cn>
On 12/30/25 06:15, Yaxiong Tian wrote:
> Due to commit 1b600da51073 ("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.
>
> Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>
> ---
> include/linux/energy_model.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
> index 43aa6153dc57..e7497f804644 100644
> --- a/include/linux/energy_model.h
> +++ b/include/linux/energy_model.h
> @@ -18,7 +18,7 @@
> * @power: The power consumed at this level (by 1 CPU or by a registered
> * device). It can be a total power: static and dynamic.
> * @cost: The cost coefficient associated with this level, used during
> - * energy calculation. Equal to: power * max_frequency / frequency
> + * energy calculation. Equal to: 10 * power * max_frequency / frequency
> * @flags: see "em_perf_state flags" description below.
> */
> struct em_perf_state {
Good catch, thank you!
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2025-12-30 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 6:15 Yaxiong Tian
2025-12-30 6:20 ` [PATCH 2/2] PM: EM: Simplify mutex-related code in energy_model.c using scoped_guard Yaxiong Tian
2025-12-30 9:35 ` Lukasz Luba [this message]
2026-01-08 15:53 ` [PATCH 1/2] PM: EM: Fix incorrect description of the cost field in struct em_perf_state Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5ee5e5b-d636-47c7-83e6-b58cab9f4d6e@arm.com \
--to=lukasz.luba@arm.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=tianyaxiong@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®