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: <CAHYJL4oBPJ=pL2GT+-j398-TsmRG9D3rwFZyo7KaHvewQk4n0w@mail.gmail.com>
Date: Sun, 4 Feb 2024 10:55:36 +0800
From: Di Shen <cindygm567@...il.com>
To: Di Shen <di.shen@...soc.com>
Cc: lukasz.luba@....com, rafael@...nel.org, daniel.lezcano@...aro.org, 
	rui.zhang@...el.com, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	xuewen.yan@...soc.com, zhanglyra@...il.com, orsonzhai@...il.com
Subject: Re: [PATCH V2] thermal: power_allocator: Avoid overwriting PID
 coefficients from setup time

Hi Lukasz,

On Thu, Jan 25, 2024 at 2:24 PM Di Shen <di.shen@...soc.com> wrote:
>
> When the PID coefficients k_* are set via sysfs before the IPA
> algorithm is triggered then the coefficients would be overwritten after
> IPA throttle() is called. The old configuration values might be
> different than the new values estimated by the IPA internal algorithm.
>
> There might be a time delay when this overwriting happens. It
> depends on the thermal zone temperature value. The temperature value
> needs to cross the first trip point value then IPA algorithms start
> operating. Although, the PID coefficients setup time should not be
> affected or linked to any later operating phase and values must not be
> overwritten.
>
> This patch initializes params->sustainable_power when the governor
> binds to thermal zone to avoid overwriting k_*. The basic function won't
> be affected, as the k_* still can be estimated if the sustainable_power
> is modified.
>
> Signed-off-by: Di Shen <di.shen@...soc.com>
> ---
>  drivers/thermal/gov_power_allocator.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
> index 81e061f183ad..1b17dc4c219c 100644
> --- a/drivers/thermal/gov_power_allocator.c
> +++ b/drivers/thermal/gov_power_allocator.c
> @@ -711,6 +711,8 @@ static int power_allocator_bind(struct thermal_zone_device *tz)
>
>         if (!tz->tzp->sustainable_power)
>                 dev_warn(&tz->device, "power_allocator: sustainable_power will be estimated\n");
> +       else
> +               params->sustainable_power = tz->tzp->sustainable_power;
>
>         estimate_pid_constants(tz, tz->tzp->sustainable_power,
>                                params->trip_switch_on,
> --
> 2.17.1
>

Any comments on patchv2?
Looking forward to hearing from you. Thanks!

Best regards,
Di

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ