From: Xiaoguang Chen <chenxg@marvell.com>
To: rjw@rjwysocki.net, viresh.kumar@linaro.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: chenxg@marvell.com, chenxg.marvell@gmail.com
Subject: [PATCH 2/2] cpufreq: conservative: set requested_freq to policy max when it is over policy max
Date: Fri, 8 Nov 2013 13:23:52 +0800 [thread overview]
Message-ID: <1383888232-27049-2-git-send-email-chenxg@marvell.com> (raw)
In-Reply-To: <1383888232-27049-1-git-send-email-chenxg@marvell.com>
When requested_freq is over policy->max, set it to policy->max.
This can help to speed up decreasing frequency.
Signed-off-by: Xiaoguang Chen <chenxg@marvell.com>
---
drivers/cpufreq/cpufreq_conservative.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 218460f..25a70d0 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -68,6 +68,9 @@ static void cs_check_cpu(int cpu, unsigned int load)
dbs_info->requested_freq += get_freq_target(cs_tuners, policy);
+ if (dbs_info->requested_freq > policy->max)
+ dbs_info->requested_freq = policy->max;
+
__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_H);
return;
--
1.8.0
next prev parent reply other threads:[~2013-11-08 5:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 5:23 [PATCH 1/2] cpufreq: conservative: fix requested_freq reduction issue Xiaoguang Chen
2013-11-08 5:23 ` Xiaoguang Chen [this message]
2013-11-08 5:27 ` [PATCH 2/2] cpufreq: conservative: set requested_freq to policy max when it is over policy max 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=1383888232-27049-2-git-send-email-chenxg@marvell.com \
--to=chenxg@marvell.com \
--cc=chenxg.marvell@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).