lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ