* [PATCH] (2/3) cpufreq_ondemand - 02_check-rate-and-break-out.diff
@ 2005-05-10 22:31 Alexander Clouter
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Clouter @ 2005-05-10 22:31 UTC (permalink / raw)
To: cpufreq; +Cc: davej, linux, alex-kernel
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] (2/3) cpufreq_ondemand - 02_check-rate-and-break-out.diff
@ 2005-02-20 13:16 Alexander Clouter
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Clouter @ 2005-02-20 13:16 UTC (permalink / raw)
To: cpufreq; +Cc: davej, linux, alex-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 447 bytes --]
Prevents un-necessary cpufreq changes if we are already at min/max
Signed-off-by: Alexander Clouter <alex-kernel@digriz.org.uk>
--
_________________________________________
/ He who lives without folly is less wise \
\ than he believes. /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
[-- Attachment #1.1.2: cpufreq_ondemand-2.6.11-rc3-mm2-02_check-rate-and-break-out.diff --]
[-- Type: text/plain, Size: 884 bytes --]
--- linux-2.6.11-rc3-mm2.orig/drivers/cpufreq/cpufreq_ondemand.c 2005-02-20 11:34:30.901742696 +0000
+++ linux-2.6.11-rc3-mm2/drivers/cpufreq/cpufreq_ondemand.c 2005-02-20 11:36:06.467214536 +0000
@@ -334,6 +334,10 @@
sampling_rate_in_HZ(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;
@@ -387,6 +391,10 @@
sampling_rate_in_HZ(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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-10 22:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-10 22:31 [PATCH] (2/3) cpufreq_ondemand - 02_check-rate-and-break-out.diff Alexander Clouter
-- strict thread matches above, loose matches on Subject: below --
2005-02-20 13:16 Alexander Clouter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox