cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Piel <Eric.Piel@tremplin-utc.net>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: cpufreq@zenii.linux.org.uk
Subject: [PATCH][2/2] ondemand governor store the idle ticks for all cpus
Date: Sun, 06 Mar 2005 19:52:22 +0100	[thread overview]
Message-ID: <422B5166.5040906@tremplin-utc.net> (raw)

[-- 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

             reply	other threads:[~2005-03-06 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-06 18:52 Eric Piel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-07  0:19 [PATCH][2/2] ondemand governor store the idle ticks for all cpus Pallipadi, Venkatesh

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=422B5166.5040906@tremplin-utc.net \
    --to=eric.piel@tremplin-utc.net \
    --cc=cpufreq@zenii.linux.org.uk \
    --cc=venkatesh.pallipadi@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