android_kernel_google_msm/kernel/time
John Stultz 4a1101d81d timekeeping: Fix leapsecond triggered load spike issue
This is a backport of 4873fa070a

The timekeeping code misses an update of the hrtimer subsystem after a
leap second happened. Due to that timers based on CLOCK_REALTIME are
either expiring a second early or late depending on whether a leap
second has been inserted or deleted until an operation is initiated
which causes that update. Unless the update happens by some other
means this discrepancy between the timekeeping and the hrtimer data
stays forever and timers are expired either early or late.

The reported immediate workaround - $ data -s "`date`" - is causing a
call to clock_was_set() which updates the hrtimer data structures.
See: http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix

Add the missing clock_was_set() call to update_wall_time() in case of
a leap second event. The actual update is deferred to softirq context
as the necessary smp function call cannot be invoked from hard
interrupt context.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Link: http://lkml.kernel.org/r/1341960205-56738-3-git-send-email-johnstul@us.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-25 20:00:16 +03:00
..
alarmtimer.c kernel: alarm: Increase power-on alarm before alarm time to 300 sec 2017-08-25 20:00:10 +03:00
clockevents.c Revert "clockevents: Set noop handler in clockevents_exchange_device()" 2011-12-30 13:24:40 -08:00
clocksource.c clocksource: Fix abs() usage w/ 64bit values 2017-08-25 20:00:11 +03:00
jiffies.c Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig tick: Document TICK_ONESHOT config option 2012-03-31 12:45:43 +02:00
Makefile Revert "HACK: time: Disable alarmtimer" 2017-08-25 16:03:46 +03:00
ntp.c ntp: Fix STA_INS/DEL clearing bug 2017-08-25 20:00:14 +03:00
posix-clock.c kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure 2011-10-31 19:30:05 -04:00
tick-broadcast.c tick: Dynamically set broadcast irq affinity 2017-08-25 16:04:02 +03:00
tick-common.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-internal.h clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-oneshot.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-sched.c Revert "sched: reinitialize rq->next_balance when a CPU is hot-added" 2017-08-25 16:04:32 +03:00
timecompare.c
timeconv.c
timekeeping.c timekeeping: Fix leapsecond triggered load spike issue 2017-08-25 20:00:16 +03:00
timer_list.c time: Remove CONFIG_TIMER_STATS 2017-07-02 13:03:26 +03:00