From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Tomasz Wilczyński" <twilczynski@naver.com>
Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: conservative: Allow down_threshold to take values from 1 to 10
Date: Mon, 12 Jun 2017 09:10:35 +0530 [thread overview]
Message-ID: <20170612034035.GB5297@vireshk-i7> (raw)
In-Reply-To: <1497169719-13613-1-git-send-email-twilczynski@naver.com>
On 11-06-17, 17:28, Tomasz Wilczyński wrote:
> Commit 27ed3cd2ebf4cd78b198be9758c538cdede36d8a ("cpufreq: conservative:
> Fix the logic in frequency decrease checking") removed the 10 point
> substraction when comparing the load against down_threshold but did not
> remove the related limit for the down_threshold value. As a result,
> down_threshold lower than 11 is not allowed even though values from
> 1 to 10 do work correctly too. The comment ("cannot be lower than 11
> otherwise freq will not fall") is also not true after removing the
> substraction.
>
> For this reason, allow down_threshold to take any value from 1 to 99
> and fix the related comment.
>
> Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
Please add Fixes tag and relevant kernel release for stable tag.
> ---
> drivers/cpufreq/cpufreq_conservative.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
> index 992f7c2..88220ff 100644
> --- a/drivers/cpufreq/cpufreq_conservative.c
> +++ b/drivers/cpufreq/cpufreq_conservative.c
> @@ -185,8 +185,8 @@ static ssize_t store_down_threshold(struct gov_attr_set *attr_set,
> int ret;
> ret = sscanf(buf, "%u", &input);
>
> - /* cannot be lower than 11 otherwise freq will not fall */
> - if (ret != 1 || input < 11 || input > 100 ||
> + /* cannot be lower than 1 otherwise freq will not fall */
> + if (ret != 1 || input < 1 || input > 100 ||
> input >= dbs_data->up_threshold)
> return -EINVAL;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
next parent reply other threads:[~2017-06-12 3:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1497169719-13613-1-git-send-email-twilczynski@naver.com>
2017-06-12 3:40 ` Viresh Kumar [this message]
2017-06-12 12:23 ` [PATCH] cpufreq: conservative: Allow down_threshold to take values from 1 to 10 Rafael J. Wysocki
[not found] ` <7fa1e0c6-8d9c-c346-f5e2-87f024ebc1bb@naver.com>
2017-06-13 6:02 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170612034035.GB5297@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=twilczynski@naver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox