aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r--kernel/time/tick-sched.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index be9707f68024..955851748dc3 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -634,10 +634,12 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
634 /* Forward the time to expire in the future */ 634 /* Forward the time to expire in the future */
635 hrtimer_forward(&ts->sched_timer, now, tick_period); 635 hrtimer_forward(&ts->sched_timer, now, tick_period);
636 636
637 if (ts->nohz_mode == NOHZ_MODE_HIGHRES) 637 if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
638 hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS_PINNED); 638 hrtimer_start_expires(&ts->sched_timer,
639 else 639 HRTIMER_MODE_ABS_PINNED_HARD);
640 } else {
640 tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1); 641 tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1);
642 }
641 643
642 /* 644 /*
643 * Reset to make sure next tick stop doesn't get fooled by past 645 * Reset to make sure next tick stop doesn't get fooled by past
@@ -802,7 +804,8 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
802 } 804 }
803 805
804 if (ts->nohz_mode == NOHZ_MODE_HIGHRES) { 806 if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
805 hrtimer_start(&ts->sched_timer, tick, HRTIMER_MODE_ABS_PINNED); 807 hrtimer_start(&ts->sched_timer, tick,
808 HRTIMER_MODE_ABS_PINNED_HARD);
806 } else { 809 } else {
807 hrtimer_set_expires(&ts->sched_timer, tick); 810 hrtimer_set_expires(&ts->sched_timer, tick);
808 tick_program_event(tick, 1); 811 tick_program_event(tick, 1);
@@ -1230,7 +1233,7 @@ static void tick_nohz_switch_to_nohz(void)
1230 * Recycle the hrtimer in ts, so we can share the 1233 * Recycle the hrtimer in ts, so we can share the
1231 * hrtimer_forward with the highres code. 1234 * hrtimer_forward with the highres code.
1232 */ 1235 */
1233 hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 1236 hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
1234 /* Get the next period */ 1237 /* Get the next period */
1235 next = tick_init_jiffy_update(); 1238 next = tick_init_jiffy_update();
1236 1239
@@ -1327,7 +1330,7 @@ void tick_setup_sched_timer(void)
1327 /* 1330 /*
1328 * Emulate tick processing via per-CPU hrtimers: 1331 * Emulate tick processing via per-CPU hrtimers:
1329 */ 1332 */
1330 hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 1333 hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
1331 ts->sched_timer.function = tick_sched_timer; 1334 ts->sched_timer.function = tick_sched_timer;
1332 1335
1333 /* Get the next period (per-CPU) */ 1336 /* Get the next period (per-CPU) */
@@ -1342,7 +1345,7 @@ void tick_setup_sched_timer(void)
1342 } 1345 }
1343 1346
1344 hrtimer_forward(&ts->sched_timer, now, tick_period); 1347 hrtimer_forward(&ts->sched_timer, now, tick_period);
1345 hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS_PINNED); 1348 hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS_PINNED_HARD);
1346 tick_nohz_activate(ts, NOHZ_MODE_HIGHRES); 1349 tick_nohz_activate(ts, NOHZ_MODE_HIGHRES);
1347} 1350}
1348#endif /* HIGH_RES_TIMERS */ 1351#endif /* HIGH_RES_TIMERS */