From: Dave Jones <davej@redhat.com>
To: Youquan Song <youquan.song@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
arjan@linux.intel.com, venki@google.com, youquan.song@intel.com,
cpufreq-list@vger.kernel.org, linux-kernel@vger.kernel.org,
vincent.guittot@linaro.org
Subject: Re: [PATCH] cpufreq: Fix ondemand governor powersave_bias execution time misuse
Date: Wed, 2 Mar 2011 11:00:34 -0500 [thread overview]
Message-ID: <20110302160033.GA27760@redhat.com> (raw)
In-Reply-To: <20110302185801.GA31349@linux-youquan.bj.intel.com>
On Wed, Mar 02, 2011 at 01:58:02PM -0500, Youquan Song wrote:
>
> > Where are we with this patch? Still needed in curent mainline?
> Do need it by current mainline. Without the patch, the ondemand
> power_bias feature is broken and does not work at all.
> Please take it.
This patch from Vincent Guittot is also pending, which seems to achieve
the same thing ?
commit 1f5a2969af7e0d040876c7ff25308c840eef18d4
Author: Vincent Guittot <vincent.guittot@linaro.org>
Date: Mon Feb 7 17:14:25 2011 +0100
[CPUFREQ] calculate delay after dbs_check_cpu
calculate ondemand delay after dbs_check_cpu call because it can
modify rate_mult value
use freq_lo_jiffies value for the sub sample period of powersave_bias mode
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index c631f27..b4e1f98 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -644,12 +644,7 @@ static void do_dbs_timer(struct work_struct *work)
unsigned int cpu = dbs_info->cpu;
int sample_type = dbs_info->sample_type;
- /* We want all CPUs to do sampling nearly on same jiffy */
- int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate
- * dbs_info->rate_mult);
-
- if (num_online_cpus() > 1)
- delay -= jiffies % delay;
+ int delay;
mutex_lock(&dbs_info->timer_mutex);
@@ -662,10 +657,20 @@ static void do_dbs_timer(struct work_struct *work)
/* Setup timer for SUB_SAMPLE */
dbs_info->sample_type = DBS_SUB_SAMPLE;
delay = dbs_info->freq_hi_jiffies;
+ } else {
+ /* We want all CPUs to do sampling nearly on
+ * same jiffy
+ */
+ delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate
+ * dbs_info->rate_mult);
+
+ if (num_online_cpus() > 1)
+ delay -= jiffies % delay;
}
} else {
__cpufreq_driver_target(dbs_info->cur_policy,
dbs_info->freq_lo, CPUFREQ_RELATION_H);
+ delay = dbs_info->freq_lo_jiffies;
}
queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
mutex_unlock(&dbs_info->timer_mutex);
prev parent reply other threads:[~2011-03-02 16:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 15:19 [PATCH] cpufreq: Fix ondemand governor powersave_bias execution time misuse Youquan Song
2010-11-05 11:49 ` Arjan van de Ven
2010-11-08 14:45 ` Youquan Song
2010-11-08 4:32 ` Arjan van de Ven
2011-03-02 1:07 ` Andrew Morton
2011-03-02 18:58 ` Youquan Song
2011-03-02 16:00 ` Dave Jones [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=20110302160033.GA27760@redhat.com \
--to=davej@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=cpufreq-list@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=venki@google.com \
--cc=vincent.guittot@linaro.org \
--cc=youquan.song@intel.com \
--cc=youquan.song@linux.intel.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