[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1edf0dcc-ca15-49fa-9c42-95e837fc073b@arm.com>
Date: Mon, 29 Jan 2024 19:15:36 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Lukasz Luba <lukasz.luba@....com>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, rafael@...nel.org
Cc: rui.zhang@...el.com, amit.kucheria@...durent.com, amit.kachhap@...il.com,
daniel.lezcano@...aro.org, viresh.kumar@...aro.org, len.brown@...el.com,
pavel@....cz, mhiramat@...nel.org, qyousef@...alina.io, wvw@...gle.com,
xuewen.yan94@...il.com
Subject: Re: [PATCH v7 22/23] PM: EM: Add em_dev_compute_costs()
On 17/01/2024 10:57, Lukasz Luba wrote:
[...]
> diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
> index e91c8efb5361..104cc2e2aa84 100644
> --- a/kernel/power/energy_model.c
> +++ b/kernel/power/energy_model.c
> @@ -276,6 +276,24 @@ static int em_compute_costs(struct device *dev, struct em_perf_state *table,
> return 0;
> }
>
> +/**
> + * em_dev_compute_costs() - Calculate cost values for new runtime EM table
> + * @dev : Device for which the EM table is to be updated
> + * @table : The new EM table that is going to get the costs calculated
> + *
> + * Calculate the em_perf_state::cost values for new runtime EM table. The
> + * values are used for EAS during task placement. It also calculates and sets
> + * the efficiency flag for each performance state. When the function finish
> + * successfully the EM table is ready to be updated and used by EAS.
> + *
> + * Return 0 on success or a proper error in case of failure.
> + */
> +int em_dev_compute_costs(struct device *dev, struct em_perf_state *table,
> + int nr_states)
> +{
> + return em_compute_costs(dev, table, NULL, nr_states, 0);
> +}
> +
Still no user of this function in this patch-set so it could be
introduced with the follow-up patch 'OPP: Add API to update EM after
adjustment of voltage for OPPs'. Especially now since Viresh and you
have agreed that this should be part of the EM code as well:
https://lkml.kernel.org/r/a42ae8dd-383c-43c0-88b4-101303d6f548@arm.com
Powered by blists - more mailing lists