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:	Tue, 9 Apr 2013 11:00:49 -0400
From:	Eduardo Valentin <eduardo.valentin@...com>
To:	Andrew Bresticker <abrestic@...omium.org>
CC:	Zhang Rui <rui.zhang@...el.com>, <linux-pm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <eduardo.valentin@...com>
Subject: Re: [PATCH] thermal: step_wise: set throttle target within thermal
 instance limits

Hi Andrew,

On 08-04-2013 19:56, Andrew Bresticker wrote:
> When selecting a target cooling state in get_target_state(), make sure
> that the state is at least as high as the minimum when the temperature
> is rising and at least as low as the maximum when the temperature is
> falling.  Previously the cooling level would only be incremented or
> decremented by one in these cases.
>
> Signed-off-by: Andrew Bresticker <abrestic@...omium.org>
> ---
>   drivers/thermal/step_wise.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
> index 0cd5e9f..49992a4 100644
> --- a/drivers/thermal/step_wise.c
> +++ b/drivers/thermal/step_wise.c
> @@ -47,9 +47,13 @@ static unsigned long get_target_state(struct thermal_instance *instance,
>   	if (trend == THERMAL_TREND_RAISING) {
>   		cur_state = cur_state < instance->upper ?
>   			    (cur_state + 1) : instance->upper;
> +		if (cur_state < instance->lower)
> +			cur_state = instance->lower;
>   	} else if (trend == THERMAL_TREND_DROPPING) {
>   		cur_state = cur_state > instance->lower ?
>   			    (cur_state - 1) : instance->lower;
> +		if (cur_state > instance->upper)
> +			cur_state = instance->upper;
>   	}


In which situations cur_state will be out of the [lower;upper] 
boundaries? I mean at this point while temperature is rising, and we are 
rising the cooling level, we should be already above lower (and 
vice-versa). Can you please describe better the situation you are trying 
to cover/ that you have identified?

>
>   	return cur_state;
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ