From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: Mike Chan <mike@android.com>
Cc: Dave Jones <davej@redhat.com>, Thomas Renninger <trenn@suse.de>,
Tejun Heo <tj@kernel.org>,
Alexander Miller <Miller@fmi.uni-stuttgart.de>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] cpufreq: ondemand: Refactor frequency increase code
Date: Wed, 27 Jan 2010 15:37:01 -0800 [thread overview]
Message-ID: <1264635421.16916.461.camel@localhost.localdomain> (raw)
In-Reply-To: <1264554408-20966-1-git-send-email-mike@android.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
On Tue, 2010-01-26 at 17:06 -0800, Mike Chan wrote:
> Make simpler to read and call.
>
> *** v3 - Always call when powersave_bias is enabled.
>
> Signed-off-by: Mike Chan <mike@android.com>
> ---
> drivers/cpufreq/cpufreq_ondemand.c | 25 ++++++++++++-------------
> 1 files changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
> index 4b34ade..516d0fe 100644
> --- a/drivers/cpufreq/cpufreq_ondemand.c
> +++ b/drivers/cpufreq/cpufreq_ondemand.c
> @@ -443,6 +443,17 @@ static struct attribute_group dbs_attr_group_old = {
>
> /************************** sysfs end ************************/
>
> +static void dbs_freq_increase(struct cpufreq_policy *p, unsigned int freq)
> +{
> + if (dbs_tuners_ins.powersave_bias)
> + freq = powersave_bias_target(p, freq, CPUFREQ_RELATION_H);
> + else if (p->cur == p->max)
> + return;
> +
> + __cpufreq_driver_target(p, freq, dbs_tuners_ins.powersave_bias ?
> + CPUFREQ_RELATION_L : CPUFREQ_RELATION_H);
> +}
> +
> static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
> {
> unsigned int max_load_freq;
> @@ -520,19 +531,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
>
> /* Check for frequency increase */
> if (max_load_freq > dbs_tuners_ins.up_threshold * policy->cur) {
> - /* if we are already at full speed then break out early */
> - if (!dbs_tuners_ins.powersave_bias) {
> - if (policy->cur == policy->max)
> - return;
> -
> - __cpufreq_driver_target(policy, policy->max,
> - CPUFREQ_RELATION_H);
> - } else {
> - int freq = powersave_bias_target(policy, policy->max,
> - CPUFREQ_RELATION_H);
> - __cpufreq_driver_target(policy, freq,
> - CPUFREQ_RELATION_L);
> - }
> + dbs_freq_increase(policy, policy->max);
> return;
> }
>
prev parent reply other threads:[~2010-01-27 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 1:06 [PATCH v3 1/2] cpufreq: ondemand: Refactor frequency increase code Mike Chan
2010-01-27 1:06 ` [PATCH v3 2/2] cpufreq: ondemand: Independent max speed for nice threads with nice_max_freq Mike Chan
2010-01-28 0:15 ` Pallipadi, Venkatesh
2010-01-27 23:37 ` Pallipadi, Venkatesh [this message]
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=1264635421.16916.461.camel@localhost.localdomain \
--to=venkatesh.pallipadi@intel.com \
--cc=Miller@fmi.uni-stuttgart.de \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@android.com \
--cc=tj@kernel.org \
--cc=trenn@suse.de \
/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).