diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-02-01 11:45:14 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-01 11:45:14 -0500 |
commit | 5df7fa1c62146a0933767d040d400013310dbcc7 (patch) | |
tree | bfd108f0d33a91d4f2476df7f5a7f562b640eb97 /kernel/time | |
parent | 1001d0a9ee74a468077dfd4da0565174e88de26b (diff) |
tick-sched: add more debug information
To allow better diagnosis of tick-sched related, especially NOHZ
related problems, we need to know when the last wakeup via an irq
happened and when the CPU left the idle state.
Add two fields (idle_waketime, idle_exittime) to the tick_sched
structure and add them to the timer_list output.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/tick-sched.c | 2 | ||||
-rw-r--r-- | kernel/time/timer_list.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 63f24b550695..88267f0a8471 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -137,6 +137,7 @@ void tick_nohz_update_jiffies(void) | |||
137 | 137 | ||
138 | cpu_clear(cpu, nohz_cpu_mask); | 138 | cpu_clear(cpu, nohz_cpu_mask); |
139 | now = ktime_get(); | 139 | now = ktime_get(); |
140 | ts->idle_waketime = now; | ||
140 | 141 | ||
141 | local_irq_save(flags); | 142 | local_irq_save(flags); |
142 | tick_do_update_jiffies64(now); | 143 | tick_do_update_jiffies64(now); |
@@ -400,6 +401,7 @@ void tick_nohz_restart_sched_tick(void) | |||
400 | * Cancel the scheduled timer and restore the tick | 401 | * Cancel the scheduled timer and restore the tick |
401 | */ | 402 | */ |
402 | ts->tick_stopped = 0; | 403 | ts->tick_stopped = 0; |
404 | ts->idle_exittime = now; | ||
403 | hrtimer_cancel(&ts->sched_timer); | 405 | hrtimer_cancel(&ts->sched_timer); |
404 | ts->sched_timer.expires = ts->idle_tick; | 406 | ts->sched_timer.expires = ts->idle_tick; |
405 | 407 | ||
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 12c5f4cb6b8c..d3d94c1a0fd2 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -166,6 +166,8 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now) | |||
166 | P(idle_calls); | 166 | P(idle_calls); |
167 | P(idle_sleeps); | 167 | P(idle_sleeps); |
168 | P_ns(idle_entrytime); | 168 | P_ns(idle_entrytime); |
169 | P_ns(idle_waketime); | ||
170 | P_ns(idle_exittime); | ||
169 | P_ns(idle_sleeptime); | 171 | P_ns(idle_sleeptime); |
170 | P(last_jiffies); | 172 | P(last_jiffies); |
171 | P(next_jiffies); | 173 | P(next_jiffies); |