aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/softirq.c
diff options
context:
space:
mode:
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>2008-01-30 07:30:04 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:04 -0500
commit6378ddb592158db4b42197f1bc8666228800e379 (patch)
treef9b1e671dfd12fb221f6140dd231ccb14cd9f27e /kernel/softirq.c
parentbbe4d18ac2e058c56adb0cd71f49d9ed3216a405 (diff)
time: track accurate idle time with tick_sched.idle_sleeptime
Current idle time in kstat is based on jiffies and is coarse grained. tick_sched.idle_sleeptime is making some attempt to keep track of idle time in a fine grained manner. But, it is not handling the time spent in interrupts fully. Make tick_sched.idle_sleeptime accurate with respect to time spent on handling interrupts and also add tick_sched.idle_lastupdate, which keeps track of last time when idle_sleeptime was updated. This statistics will be crucial for cpufreq-ondemand governor, which can shed some conservative gaurd band that is uses today while setting the frequency. The ondemand changes that uses the exact idle time is coming soon. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r--kernel/softirq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 8fe1ff40102d..d7837d45419e 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -280,9 +280,14 @@ asmlinkage void do_softirq(void)
280 */ 280 */
281void irq_enter(void) 281void irq_enter(void)
282{ 282{
283#ifdef CONFIG_NO_HZ
284 int cpu = smp_processor_id();
285 if (idle_cpu(cpu) && !in_interrupt())
286 tick_nohz_stop_idle(cpu);
287#endif
283 __irq_enter(); 288 __irq_enter();
284#ifdef CONFIG_NO_HZ 289#ifdef CONFIG_NO_HZ
285 if (idle_cpu(smp_processor_id())) 290 if (idle_cpu(cpu))
286 tick_nohz_update_jiffies(); 291 tick_nohz_update_jiffies();
287#endif 292#endif
288} 293}