diff options
-rw-r--r-- | include/linux/tick.h | 4 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 2 | ||||
-rw-r--r-- | kernel/time/timer_list.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index 0fadf95debe1..a881c652f7e9 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -39,6 +39,8 @@ enum tick_nohz_mode { | |||
39 | * @idle_calls: Total number of idle calls | 39 | * @idle_calls: Total number of idle calls |
40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped | 40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped |
41 | * @idle_entrytime: Time when the idle call was entered | 41 | * @idle_entrytime: Time when the idle call was entered |
42 | * @idle_waketime: Time when the idle was interrupted | ||
43 | * @idle_exittime: Time when the idle state was left | ||
42 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | 44 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped |
43 | * @sleep_length: Duration of the current idle sleep | 45 | * @sleep_length: Duration of the current idle sleep |
44 | */ | 46 | */ |
@@ -53,6 +55,8 @@ struct tick_sched { | |||
53 | unsigned long idle_sleeps; | 55 | unsigned long idle_sleeps; |
54 | int idle_active; | 56 | int idle_active; |
55 | ktime_t idle_entrytime; | 57 | ktime_t idle_entrytime; |
58 | ktime_t idle_waketime; | ||
59 | ktime_t idle_exittime; | ||
56 | ktime_t idle_sleeptime; | 60 | ktime_t idle_sleeptime; |
57 | ktime_t idle_lastupdate; | 61 | ktime_t idle_lastupdate; |
58 | ktime_t sleep_length; | 62 | ktime_t sleep_length; |
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); |