]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/time/tick-sched.c
timers: Forward the wheel clock whenever possible
[karo-tx-linux.git] / kernel / time / tick-sched.c
index 69abc7bfe80f9318a1e52f83ce42e6410e23f2de..5d81f9aa30d2e58d00dbeadca6dfd8101066f209 100644 (file)
@@ -700,6 +700,12 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
        delta = next_tick - basemono;
        if (delta <= (u64)TICK_NSEC) {
                tick.tv64 = 0;
+
+               /*
+                * Tell the timer code that the base is not idle, i.e. undo
+                * the effect of get_next_timer_interrupt():
+                */
+               timer_clear_idle();
                /*
                 * We've not stopped the tick yet, and there's a timer in the
                 * next period, so no point in stopping it either, bail.
@@ -809,6 +815,12 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
        tick_do_update_jiffies64(now);
        cpu_load_update_nohz_stop();
 
+       /*
+        * Clear the timer idle flag, so we avoid IPIs on remote queueing and
+        * the clock forward checks in the enqueue path:
+        */
+       timer_clear_idle();
+
        calc_load_exit_idle();
        touch_softlockup_watchdog_sched();
        /*