[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701291722.41705.fzu@wemgehoertderstaat.de>
Date: Mon, 29 Jan 2007 17:22:41 +0100
From: Karsten Wiese <fzu@...gehoertderstaat.de>
To: Andrew Morton <akpm@...l.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: 2.6.20-rc6-mm2
Hi,
with dynticks and highres_timers enabled, cpufreq_ondemand makes mess here on
an AMD64 UP.
cpufreq_ondemand assumes that jiffies advance at exactly the same pace as the
sum of all kstat_cpu(cpu).cpustat.* members.
This isn't the case here as dmesg output from patch below shows.
Is cpufreq_ondemand correct assuming
"jiffies advance at exactly the same pace as the
sum of all kstat_cpu(cpu).cpustat.* members"?
Or is "dynticks and highres_timers"'s behaviour of incrementing the
sum of kstat_cpu(cpu).cpustat.* members faster than jiffies?
Karsten
diff -pur rc6-mm2/drivers/cpufreq/cpufreq_ondemand.c rc6-mm2-kw/drivers/cpufreq/cpufreq_ondemand.c
--- rc6-mm2/drivers/cpufreq/cpufreq_ondemand.c 2007-01-29 10:40:39.000000000 +0100
+++ rc6-mm2-kw/drivers/cpufreq/cpufreq_ondemand.c 2007-01-29 11:37:08.000000000 +0100
@@ -370,7 +370,15 @@ static void dbs_check_cpu(struct cpu_dbs
if (tmp_idle_ticks < idle_ticks)
idle_ticks = tmp_idle_ticks;
}
- load = (100 * (total_ticks - idle_ticks)) / total_ticks;
+ if (total_ticks < idle_ticks) {
+ static bool did;
+ if (!did) {
+ printk(KERN_INFO"%s: t%u < i%u\n", __FUNCTION__, total_ticks, idle_ticks);
+ did = true;
+ }
+ load = 0;
+ } else
+ load = (100 * (total_ticks - idle_ticks)) / total_ticks;
/* Check for frequency increase */
if (load > dbs_tuners_ins.up_threshold) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists