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]
Message-Id: <20230925081139.1305766-19-lukasz.luba@arm.com>
Date:   Mon, 25 Sep 2023 09:11:39 +0100
From:   Lukasz Luba <lukasz.luba@....com>
To:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        rafael@...nel.org
Cc:     lukasz.luba@....com, dietmar.eggemann@....com, 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
Subject: [PATCH v4 18/18] Documentation: EM: Update information about performance field

The Energy Model supports the new information: performance for each
performance state. Update the needed documentation part accordingly.

Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
 Documentation/power/energy-model.rst | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
index 3115411f9839..da3619c0b98a 100644
--- a/Documentation/power/energy-model.rst
+++ b/Documentation/power/energy-model.rst
@@ -125,6 +125,11 @@ runtime static EM' (system property) design to a 'single EM which can be
 changed during runtime according e.g. to the workload' (system and workload
 property) design.
 
+It is possible also to modify the CPU performance values for each EM's
+performance state. Thus, the full power and performance profile (which
+is an exponential curve) can be changed according e.g. to the workload
+or system property.
+
 
 3. Core APIs
 ------------
@@ -326,18 +331,18 @@ EM framework::
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 This section provides a simple example of a thermal driver modifying the EM.
-The driver implements a foo_mod_power() function to be provided to the
+The driver implements a mod_power_perf() function to be provided to the
 EM framework. The driver is woken up periodically to check the temperature
 and modify the EM data if needed::
 
   -> drivers/thermal/foo_thermal.c
 
-  01	static int foo_mod_power(struct device *dev, unsigned long freq,
-  02			unsigned long *power, void *priv)
+  01	static int mod_power_perf(struct device *dev, unsigned long freq,
+  02			unsigned long *power, unsigned long *perf, void *priv)
   03	{
   04		struct foo_context *ctx = priv;
   05
-  06		/* Estimate power for the given frequency and temperature */
+  06		*perf = foo_estimate_performance(dev, freq);
   07		*power = foo_estimate_power(dev, freq, ctx->temperature);
   08		if (*power >= EM_MAX_POWER);
   09			return -EINVAL;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ