diff options
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r-- | kernel/time/tick-sched.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 825b4c00fe44..a87b0468568b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -162,6 +162,8 @@ void tick_nohz_stop_idle(int cpu) | |||
162 | ts->idle_lastupdate = now; | 162 | ts->idle_lastupdate = now; |
163 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); | 163 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); |
164 | ts->idle_active = 0; | 164 | ts->idle_active = 0; |
165 | |||
166 | sched_clock_idle_wakeup_event(0); | ||
165 | } | 167 | } |
166 | } | 168 | } |
167 | 169 | ||
@@ -177,6 +179,7 @@ static ktime_t tick_nohz_start_idle(struct tick_sched *ts) | |||
177 | } | 179 | } |
178 | ts->idle_entrytime = now; | 180 | ts->idle_entrytime = now; |
179 | ts->idle_active = 1; | 181 | ts->idle_active = 1; |
182 | sched_clock_idle_sleep_event(); | ||
180 | return now; | 183 | return now; |
181 | } | 184 | } |
182 | 185 | ||
@@ -289,7 +292,6 @@ void tick_nohz_stop_sched_tick(int inidle) | |||
289 | ts->tick_stopped = 1; | 292 | ts->tick_stopped = 1; |
290 | ts->idle_jiffies = last_jiffies; | 293 | ts->idle_jiffies = last_jiffies; |
291 | rcu_enter_nohz(); | 294 | rcu_enter_nohz(); |
292 | sched_clock_tick_stop(cpu); | ||
293 | } | 295 | } |
294 | 296 | ||
295 | /* | 297 | /* |
@@ -392,7 +394,6 @@ void tick_nohz_restart_sched_tick(void) | |||
392 | select_nohz_load_balancer(0); | 394 | select_nohz_load_balancer(0); |
393 | now = ktime_get(); | 395 | now = ktime_get(); |
394 | tick_do_update_jiffies64(now); | 396 | tick_do_update_jiffies64(now); |
395 | sched_clock_tick_start(cpu); | ||
396 | cpu_clear(cpu, nohz_cpu_mask); | 397 | cpu_clear(cpu, nohz_cpu_mask); |
397 | 398 | ||
398 | /* | 399 | /* |
@@ -645,17 +646,21 @@ void tick_setup_sched_timer(void) | |||
645 | ts->nohz_mode = NOHZ_MODE_HIGHRES; | 646 | ts->nohz_mode = NOHZ_MODE_HIGHRES; |
646 | #endif | 647 | #endif |
647 | } | 648 | } |
649 | #endif /* HIGH_RES_TIMERS */ | ||
648 | 650 | ||
651 | #if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS | ||
649 | void tick_cancel_sched_timer(int cpu) | 652 | void tick_cancel_sched_timer(int cpu) |
650 | { | 653 | { |
651 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); | 654 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); |
652 | 655 | ||
656 | # ifdef CONFIG_HIGH_RES_TIMERS | ||
653 | if (ts->sched_timer.base) | 657 | if (ts->sched_timer.base) |
654 | hrtimer_cancel(&ts->sched_timer); | 658 | hrtimer_cancel(&ts->sched_timer); |
659 | # endif | ||
655 | 660 | ||
656 | ts->nohz_mode = NOHZ_MODE_INACTIVE; | 661 | ts->nohz_mode = NOHZ_MODE_INACTIVE; |
657 | } | 662 | } |
658 | #endif /* HIGH_RES_TIMERS */ | 663 | #endif |
659 | 664 | ||
660 | /** | 665 | /** |
661 | * Async notification about clocksource changes | 666 | * Async notification about clocksource changes |