fix cpufreq-ondemand by accounting skipped ticks as idle ticks [Was: [PATCH] i386 no idle HZ aka Dynticks 051203]

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

 



Account ticks skipped dynamically as idle ticks.

This allows the ondemand cpufreq governor to work correctly with dyntick.

Signed-off-by: Dominik Brodowski <[email protected]>

Index: working-tree/arch/i386/kernel/dyn-tick.c
===================================================================
--- working-tree.orig/arch/i386/kernel/dyn-tick.c
+++ working-tree/arch/i386/kernel/dyn-tick.c
@@ -19,6 +19,7 @@
 #include <linux/dyn-tick.h>
 #include <linux/timer.h>
 #include <linux/irq.h>
+#include <linux/kernel_stat.h>
 #include <asm/apic.h>
 #include <asm/dyn-tick.h>
 
@@ -109,6 +110,8 @@ void dyn_tick_interrupt(struct pt_regs *
 			do_timer(regs);
 		if (cpu_has_local_apic())
 			enable_pit_timer();
+		if (lost)
+			kstat_cpu(cpu).cpustat.idle += (lost - 1);
 	}
 	cpu_clear(cpu, nohz_cpu_mask);
 	spin_unlock(&dyn_tick->lock);
-
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