From: Eric Piel <Eric.Piel@tremplin-utc.net>
To: Dave Jones <davej@redhat.com>
Cc: cpufreq@zenii.linux.org.uk, linux@dominikbrodowski.net
Subject: [PATCH] [1/3] ondemand governor clean-up
Date: Wed, 11 May 2005 14:23:36 +0200 [thread overview]
Message-ID: <4281F948.3060507@tremplin-utc.net> (raw)
In-Reply-To: <4281F837.5070608@tremplin-utc.net>
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
Ondemand governor clean-up, it factorises the idle ticks measurement.
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
--
[-- Attachment #2: ondemand-cleanup-factorise-idle-measurement-2.6.11-20050511.patch --]
[-- Type: text/x-patch, Size: 2497 bytes --]
--- linux-2.6.11/drivers/cpufreq/cpufreq_ondemand.c.cpufreq-20050501 2005-05-11 13:03:21.000000000 +0200
+++ linux-2.6.11/drivers/cpufreq/cpufreq_ondemand.c 2005-05-11 13:19:55.000000000 +0200
@@ -222,7 +222,6 @@ static struct attribute_group dbs_attr_g
static void dbs_check_cpu(int cpu)
{
unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;
- unsigned int total_idle_ticks;
unsigned int freq_down_step;
unsigned int freq_down_sampling_rate;
static int down_skip[NR_CPUS];
@@ -251,20 +250,11 @@ static void dbs_check_cpu(int cpu)
*/
/* Check for frequency increase */
- total_idle_ticks = kstat_cpu(cpu).cpustat.idle +
- kstat_cpu(cpu).cpustat.iowait;
- idle_ticks = total_idle_ticks -
- this_dbs_info->prev_cpu_idle_up;
- this_dbs_info->prev_cpu_idle_up = total_idle_ticks;
-
-
+ idle_ticks = UINT_MAX;
for_each_cpu_mask(j, policy->cpus) {
- unsigned int tmp_idle_ticks;
+ unsigned int tmp_idle_ticks, total_idle_ticks;
struct cpu_dbs_info_s *j_dbs_info;
- if (j == cpu)
- continue;
-
j_dbs_info = &per_cpu(cpu_dbs_info, j);
/* Check for frequency increase */
total_idle_ticks = kstat_cpu(j).cpustat.idle +
@@ -286,7 +276,7 @@ static void dbs_check_cpu(int cpu)
__cpufreq_driver_target(policy, policy->max,
CPUFREQ_RELATION_H);
down_skip[cpu] = 0;
- this_dbs_info->prev_cpu_idle_down = total_idle_ticks;
+ this_dbs_info->prev_cpu_idle_down = this_dbs_info->prev_cpu_idle_up;
return;
}
@@ -295,19 +285,11 @@ static void dbs_check_cpu(int cpu)
if (down_skip[cpu] < dbs_tuners_ins.sampling_down_factor)
return;
- total_idle_ticks = kstat_cpu(cpu).cpustat.idle +
- kstat_cpu(cpu).cpustat.iowait;
- idle_ticks = total_idle_ticks -
- this_dbs_info->prev_cpu_idle_down;
- this_dbs_info->prev_cpu_idle_down = total_idle_ticks;
-
+ idle_ticks = UINT_MAX;
for_each_cpu_mask(j, policy->cpus) {
- unsigned int tmp_idle_ticks;
+ unsigned int tmp_idle_ticks, total_idle_ticks;
struct cpu_dbs_info_s *j_dbs_info;
- if (j == cpu)
- continue;
-
j_dbs_info = &per_cpu(cpu_dbs_info, j);
/* Check for frequency increase */
total_idle_ticks = kstat_cpu(j).cpustat.idle +
@@ -329,7 +311,7 @@ static void dbs_check_cpu(int cpu)
down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) *
usecs_to_jiffies(freq_down_sampling_rate);
- if (idle_ticks > down_idle_ticks ) {
+ if (idle_ticks > down_idle_ticks) {
freq_down_step = (5 * policy->max) / 100;
/* max freq cannot be less than 100. But who knows.... */
[-- Attachment #3: Type: text/plain, Size: 147 bytes --]
_______________________________________________
Cpufreq mailing list
Cpufreq@lists.linux.org.uk
http://lists.linux.org.uk/mailman/listinfo/cpufreq
next prev parent reply other threads:[~2005-05-11 12:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-14 7:29 cpufreq on-demand governor up_treshold? Jan De Luyck
2005-03-14 7:57 ` Eric Piel
2005-03-14 11:19 ` Bruno Ducrot
2005-03-14 12:40 ` Jan De Luyck
2005-03-14 22:39 ` Dominik Brodowski
2005-05-11 1:33 ` Dave Jones
2005-05-11 2:34 ` Dave Jones
2005-05-11 12:19 ` Eric Piel
2005-05-11 12:23 ` Eric Piel [this message]
2005-05-11 12:27 ` [PATCH][2/3] ondemand governor store the idle ticks for all cpus Eric Piel
2005-05-11 12:31 ` [PATCH][3/3] ondemand governor automatic downscaling Eric Piel
2005-05-12 23:16 ` cpufreq on-demand governor up_treshold? Eric Piel
2005-05-17 0:15 ` [PATCH] ondemand,conservative minor bug-fix and cleanup Venkatesh Pallipadi
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=4281F948.3060507@tremplin-utc.net \
--to=eric.piel@tremplin-utc.net \
--cc=cpufreq@zenii.linux.org.uk \
--cc=davej@redhat.com \
--cc=linux@dominikbrodowski.net \
/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