]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/time/tick-sched.c
nohz: Fix one jiffy count too far in idle cputime
[karo-tx-linux.git] / kernel / time / tick-sched.c
index 024540f97f74c3e94205826f33d3968ea765f626..e430b97438dc135f4a45476abb209dba0707633c 100644 (file)
@@ -573,6 +573,7 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
        tick_do_update_jiffies64(now);
        update_cpu_load_nohz();
 
+       calc_load_exit_idle();
        touch_softlockup_watchdog();
        /*
         * Cancel the scheduled timer and restore the tick
@@ -834,7 +835,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
                 */
                if (ts->tick_stopped) {
                        touch_softlockup_watchdog();
-                       if (idle_cpu(cpu))
+                       if (is_idle_task(current))
                                ts->idle_jiffies++;
                }
                update_process_times(user_mode(regs));