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-next>] [day] [month] [year] [list]
Date:   Thu, 13 Oct 2022 17:07:33 +0800
From:   Qibo Huang <huangqibo.tech@...il.com>
To:     lukasz.luba@....com
Cc:     rafael@...nel.org, daniel.lezcano@...aro.org, amitk@...nel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        rui.zhang@...el.com, Qibo Huang <huangqibo.tech@...il.com>
Subject: [PATCH] thermal/governors: Remove integral_cutoff parameter, IPA is more regulated

Reason 1: If the integral_cutoff parameter is 0,
the current temperature is greater than the control
temperature, and err_integral continues to increase.
If an abnormal situation occurs suddenly, the err_integral
value will become very large. Even if the current
temperature is lower than the control temperature,
err_integral will always exist, which will cause the
IPA to run out of control and cannot return to normal.
This is the problem I'm actually having.

Reason 2: The integral_cutoff parameter is difficult to
confirm the optimal, and can not bring good results.

Signed-off-by: Qibo Huang <huangqibo.tech@...il.com>
---
 drivers/thermal/gov_power_allocator.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 2bdf8d797e3c..87e87ce71ff3 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -221,6 +221,7 @@ static u32 pid_controller(struct thermal_zone_device *tz,
 	s64 p, i, d, power_range;
 	s32 err, max_power_frac;
 	u32 sustainable_power;
+	s64 i_next;
 	struct power_allocator_params *params = tz->governor_data;
 
 	max_power_frac = int_to_frac(max_allocatable_power);
@@ -241,13 +242,11 @@ static u32 pid_controller(struct thermal_zone_device *tz,
 	 */
 	i = mul_frac(tz->tzp->k_i, params->err_integral);
 
-	if (err < int_to_frac(tz->tzp->integral_cutoff)) {
-		s64 i_next = i + mul_frac(tz->tzp->k_i, err);
+	i_next = i + mul_frac(tz->tzp->k_i, err);
 
-		if (abs(i_next) < max_power_frac) {
-			i = i_next;
-			params->err_integral += err;
-		}
+	if (abs(i_next) < max_power_frac) {
+		i = i_next;
+		params->err_integral += err;
 	}
 
 	/*
-- 
2.37.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ