Re: 2.6.20-rc6-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux