From: Alexander Clouter <alex@digriz.org.uk>
To: cpufreq@lists.linux.org.uk
Cc: davej@redhat.com, linux@dominikbrodowski.de, alex-kernel@digriz.org.uk
Subject: [PATCH] (2/3) cpufreq_ondemand - 02_check-rate-and-break-out.diff
Date: Tue, 10 May 2005 23:31:31 +0100 [thread overview]
Message-ID: <20050510223131.GC4478@inskipp> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 482 bytes --]
Prevents un-necessary cpufreq changes if we are already at min/max
Signed-off-by: Alexander Clouter <alex-kernel@digriz.org.uk>
--
_______________________________________
/ Things are not always what they seem. \
| |
\ -- Phaedrus /
---------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
[-- Attachment #1.1.2: cpufreq_ondemand-2.6.12-rc3-mm3-02_check-rate-and-break-out.diff --]
[-- Type: text/plain, Size: 878 bytes --]
--- linux-2.6.12-rc3-mm3.orig/drivers/cpufreq/cpufreq_ondemand.c 2005-05-10 22:21:35.370204952 +0100
+++ linux-2.6.12-rc3-mm3/drivers/cpufreq/cpufreq_ondemand.c 2005-05-10 22:22:02.832030120 +0100
@@ -333,6 +333,10 @@
usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
if (idle_ticks < up_idle_ticks) {
+ /* if we are already at full speed then break out early */
+ if (policy->cur == policy->max)
+ return;
+
__cpufreq_driver_target(policy, policy->max,
CPUFREQ_RELATION_H);
down_skip[cpu] = 0;
@@ -386,6 +390,10 @@
usecs_to_jiffies(freq_down_sampling_rate);
if (idle_ticks > down_idle_ticks ) {
+ /* if we are already at the lowest speed then break out early */
+ if (policy->cur == policy->min)
+ return;
+
freq_down_step = (5 * policy->max) / 100;
/* max freq cannot be less than 100. But who knows.... */
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
next reply other threads:[~2005-05-10 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-10 22:31 Alexander Clouter [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-02-20 13:16 [PATCH] (2/3) cpufreq_ondemand - 02_check-rate-and-break-out.diff Alexander Clouter
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=20050510223131.GC4478@inskipp \
--to=alex@digriz.org.uk \
--cc=alex-kernel@digriz.org.uk \
--cc=cpufreq@lists.linux.org.uk \
--cc=davej@redhat.com \
--cc=linux@dominikbrodowski.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