alistair23-linux/kernel/time
Andreas Sandberg 38d23a6cc1 tick: hrtimer-broadcast: Prevent endless restarting when broadcast device is unused
The hrtimer callback in the hrtimer's tick broadcast code sometimes
incorrectly ends up scheduling events at the current tick causing the
kernel to hang servicing the same hrtimer forever. This typically
happens when a device is swapped out by
tick_install_broadcast_device(), which replaces the event handler with
clock_events_handle_noop() and sets the device mode to
CLOCK_EVT_MODE_UNUSED. If the timer is scheduled when this happens,
the next_event field will not be updated and the hrtimer ends up being
restarted at the current tick. To prevent this from happening, only
try to restart the hrtimer if the broadcast clock event device is in
one of the active modes and try to cancel the timer when entering the
CLOCK_EVT_MODE_UNUSED mode.

Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1429880765-5558-1-git-send-email-andreas.sandberg@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-05-05 15:34:21 +02:00
..
alarmtimer.c alarmtimer: Get rid of unused return value 2015-04-22 17:06:52 +02:00
clockevents.c clockevents: Cleanup dead cpu explicitely 2015-04-03 08:44:37 +02:00
clocksource.c clocksource: Improve comment explaining clocks_calc_max_nsecs()'s 50% safety margin 2015-04-03 08:18:35 +02:00
hrtimer.c hrtimer: Allow concurrent hrtimer_start() for self restarting timers 2015-04-22 17:06:52 +02:00
itimer.c
jiffies.c tick: Move clocksource related stuff to timekeeping.h 2015-04-01 14:22:58 +02:00
Kconfig clockevents: Remove CONFIG_GENERIC_CLOCKEVENTS_BUILD 2015-04-01 14:22:57 +02:00
Makefile clockevents: Remove CONFIG_GENERIC_CLOCKEVENTS_BUILD 2015-04-01 14:22:57 +02:00
ntp.c time: Add y2038 safe update_persistent_clock64() 2015-04-03 08:18:20 +02:00
ntp_internal.h timekeeping: Convert timekeeping core to use timespec64s 2014-07-23 10:17:54 -07:00
posix-clock.c
posix-cpu-timers.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
posix-timers.c hrtimer: Get rid of hrtimer_get_res() 2015-04-22 17:06:49 +02:00
sched_clock.c timers, sched/clock: Clean up the code a bit 2015-03-27 08:34:01 +01:00
test_udelay.c time: Rename udelay_test.c to test_udelay.c 2014-11-21 11:59:55 -08:00
tick-broadcast-hrtimer.c tick: hrtimer-broadcast: Prevent endless restarting when broadcast device is unused 2015-05-05 15:34:21 +02:00
tick-broadcast.c tick: broadcast: Simplify oneshot logic and shorten lock region 2015-05-05 10:25:23 +02:00
tick-common.c hrtimer: Get rid of hrtimer softirq 2015-04-22 17:06:50 +02:00
tick-internal.h tick: Nohz: Rework next timer evaluation 2015-04-22 17:06:50 +02:00
tick-oneshot.c clockevents: Manage device's state separately for the core 2015-03-27 10:26:19 +01:00
tick-sched.c tick: Nohz: Rework next timer evaluation 2015-04-22 17:06:50 +02:00
tick-sched.h tick: Nohz: Rework next timer evaluation 2015-04-22 17:06:50 +02:00
time.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-01-25 17:47:34 -08:00
timeconst.bc
timeconv.c
timecounter.c timecounter: keep track of accumulated fractional nanoseconds 2014-12-30 18:29:27 -05:00
timekeeping.c hrtimer: Make offset update smarter 2015-04-22 17:06:49 +02:00
timekeeping.h hrtimer: Make offset update smarter 2015-04-22 17:06:49 +02:00
timekeeping_debug.c timekeeping: Convert timekeeping core to use timespec64s 2014-07-23 10:17:54 -07:00
timekeeping_internal.h clocksource: Move cycle_last validation to core code 2014-07-23 15:01:51 -07:00
timer.c timer: Use timer->base for flag checks 2015-05-05 10:40:43 +02:00
timer_list.c tick-broadcast: Fix the printing of broadcast masks 2015-05-05 10:35:58 +02:00
timer_stats.c