Neal Cardwell 6f103929f8 nohz: Fix stale jiffies update in tick_nohz_restart()
Fix tick_nohz_restart() to not use a stale ktime_t "now" value when
calling tick_do_update_jiffies64(now).

If we reach this point in the loop it means that we crossed a tick
boundary since we grabbed the "now" timestamp, so at this point "now"
refers to a time in the old jiffy, so using the old value for "now" is
incorrect, and is likely to give us a stale jiffies value.

In particular, the first time through the loop the
tick_do_update_jiffies64(now) call is always a no-op, since the
caller, tick_nohz_restart_sched_tick(), will have already called
tick_do_update_jiffies64(now) with that "now" value.

Note that tick_nohz_stop_sched_tick() already uses the correct
approach: when we notice we cross a jiffy boundary, grab a new
timestamp with ktime_get(), and *then* update jiffies.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Ben Segall <bsegall@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1332875377-23014-1-git-send-email-ncardwell@google.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-04-06 13:24:17 +02:00
..
2011-07-26 16:49:45 -07:00
2012-03-21 10:15:51 -07:00
2011-03-14 09:15:23 -04:00
2011-09-23 12:05:29 +05:30
2012-02-14 10:45:42 +11:00
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2012-03-23 16:58:42 -07:00
2012-03-26 12:50:53 +10:30
2012-03-23 16:58:41 -07:00
2012-03-28 18:30:03 +01:00
2012-03-28 15:58:21 -07:00
2011-10-31 17:30:44 -07:00
2011-09-19 17:04:37 -07:00
2012-03-15 18:17:55 -07:00