* [PATCH][2/2] ondemand governor store the idle ticks for all cpus
@ 2005-03-06 18:52 Eric Piel
0 siblings, 0 replies; 2+ messages in thread
From: Eric Piel @ 2005-03-06 18:52 UTC (permalink / raw)
To: Pallipadi, Venkatesh; +Cc: cpufreq
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Hello,
While doing the previous cleanup I noticed that until now only the
prev_cpu_idle_up of the current CPU would be stored to
prev_cpu_idle_down. In case of several associated CPUs, all the
measurement is based on looking every CPU statistic. Therefore it is
necessary to also save the prev_cpu_idle_up of the other associated CPUs.
This patch fixes this by adding a small loop. As the previous patch,
it's against 2.6.11 and only tested on a monoprocessor PC.
Eric
PS: I couldn't find any documentation concerning the implementation of
several CPUs with a frequency attached, is there any reference?
--
Ondemand governor did not store prev_cpu_idle_up into prev_cpu_idle_down
for other CPUs than the current CPU.
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
--
[-- Attachment #2: ondemand-save-idle-up-for-all-cpu-2.6.11.patch --]
[-- Type: text/x-patch, Size: 587 bytes --]
--- linux-2.6.11/drivers/cpufreq/cpufreq_ondemand.c.clean2 2005-03-06 19:04:12.000000000 +0100
+++ linux-2.6.11/drivers/cpufreq/cpufreq_ondemand.c 2005-03-06 19:09:52.000000000 +0100
@@ -277,7 +277,12 @@
__cpufreq_driver_target(policy, policy->max,
CPUFREQ_RELATION_H);
down_skip[cpu] = 0;
- this_dbs_info->prev_cpu_idle_down = this_dbs_info->prev_cpu_idle_up;
+ for_each_cpu_mask(j, policy->cpus) {
+ struct cpu_dbs_info_s *j_dbs_info;
+
+ j_dbs_info = &per_cpu(cpu_dbs_info, j);
+ j_dbs_info->prev_cpu_idle_down = j_dbs_info->prev_cpu_idle_up;
+ }
return;
}
[-- Attachment #3: 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
* RE: [PATCH][2/2] ondemand governor store the idle ticks for all cpus
@ 2005-03-07 0:19 Pallipadi, Venkatesh
0 siblings, 0 replies; 2+ messages in thread
From: Pallipadi, Venkatesh @ 2005-03-07 0:19 UTC (permalink / raw)
To: Eric Piel; +Cc: davej, cpufreq
>-----Original Message-----
>From: Eric Piel [mailto:Eric.Piel@tremplin-utc.net]
>Sent: Sunday, March 06, 2005 10:52 AM
>To: Pallipadi, Venkatesh
>
>This patch fixes this by adding a small loop. As the previous patch,
>it's against 2.6.11 and only tested on a monoprocessor PC.
>
Good catch.
Dave/Dominik: please apply these two patches.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
>PS: I couldn't find any documentation concerning the implementation of
>several CPUs with a frequency attached, is there any reference?
Only documentation for several CPUs with freq attached:
(From patch comments)
The following patch makes ondemand governor aware of policy->cpus.
policy->cpus mask lets multiple cpu use the same policy (useful where
cpus
share the frequency state), a recent change in cpufreq core.
Now ondemand governor looks at all cpus in policy->cpus and takes its
frequency increase/decrease decisions based on most lightly loaded cpu
in
the group. This patch will not affect systems where policy->cpus contain
only one cpu.
Thanks,
Venki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-07 0:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 18:52 [PATCH][2/2] ondemand governor store the idle ticks for all cpus Eric Piel
-- strict thread matches above, loose matches on Subject: below --
2005-03-07 0:19 Pallipadi, Venkatesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox