WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][cpufreq] Correctly calculate load

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][cpufreq] Correctly calculate load
From: "Mark Langsdorf" <mark.langsdorf@xxxxxxx>
Date: Mon, 3 Dec 2007 10:50:36 -0600
Delivery-date: Mon, 03 Dec 2007 08:53:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
The idle time of the system should be less than the wall time
of the system.  The initial implementation incorrectly set
idle time to wall time when idle time was less than wall time,
instead of when idle time was more than wall time.  Correct
this error.

Signed-off-by: Mark Langsdorf <mark.langsdorf@xxxxxxx>

diff -r fd879c0688bf drivers/cpufreq/cpufreq_ondemand.c
--- a/drivers/cpufreq/cpufreq_ondemand.c        Fri Nov 23 16:26:56 2007 +0000
+++ b/drivers/cpufreq/cpufreq_ondemand.c        Mon Dec 03 10:27:45 2007 -0600
@@ -319,7 +319,7 @@ static int dbs_calc_load(struct cpu_dbs_
                tmp_idle_msecs = tmp_idle_nsecs;
                if (tmp_wall_msecs == 0)
                        tmp_wall_msecs = 1;
-               if (tmp_idle_msecs < tmp_wall_msecs)
+               if (tmp_idle_msecs > tmp_wall_msecs)
                        tmp_idle_msecs = tmp_wall_msecs;
 
                tmp_load = (100 * (tmp_wall_msecs - tmp_idle_msecs)) /



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][cpufreq] Correctly calculate load, Mark Langsdorf <=