android_kernel_motorola_sm6225/kernel/time
Viresh Kumar 9f6d9baaa8 timer: Kick dynticks targets on mod_timer*() calls
When a timer is enqueued or modified on a dynticks target, that CPU
must re-evaluate the next tick to service that timer.

The tick re-evaluation is performed by an IPI kick on the target.
Now while we correctly call wake_up_nohz_cpu() from add_timer_on(), the
mod_timer*() API family doesn't support so well dynticks targets.

The reason for this is likely that __mod_timer() isn't supposed to
select an idle target for a timer, unless that target is the current
CPU, in which case a dynticks idle kick isn't actually needed.

But there is a small race window lurking behind that assumption: the
elected target has all the time to turn dynticks idle between the call
to get_nohz_timer_target() and the locking of its base. Hence a risk
that we enqueue a timer on a dynticks idle destination without kicking
it. As a result, the timer might be serviced too late in the future.

Also a target elected by __mod_timer() can be in full dynticks mode
and thus require to be kicked as well. And unlike idle dynticks, this
concern both local and remote targets.

To fix this whole issue, lets centralize the dynticks kick to
internal_add_timer() so that it is well handled for all sort of timer
enqueue. Even timer migration is concerned so that a full dynticks target
is correctly kicked as needed when timers are migrating to it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1403393357-2070-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-06-23 11:23:47 +02:00
..
alarmtimer.c alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist 2013-10-18 16:23:58 -07:00
clockevents.c time: Change the return type of clockevents_notify() to integer 2014-02-07 15:34:29 +01:00
clocksource.c time: Fix signedness bug in sysfs_get_uname() and its callers 2013-10-18 16:45:58 -07:00
hrtimer.c time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
itimer.c time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
jiffies.c time: Fix overflow when HZ is smaller than 60 2014-02-06 16:01:40 +01:00
Kconfig nohz: ensure users are aware boot CPU is not NO_HZ_FULL 2014-02-14 17:59:17 +01:00
Makefile time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
ntp.c Merge branch 'akpm' (patchbomb from Andrew) into next 2014-06-04 16:55:13 -07:00
ntp_internal.h ntp: Rework do_adjtimex to take timespec and tai arguments 2013-04-04 13:18:15 -07:00
posix-clock.c kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure 2011-10-31 19:30:05 -04:00
posix-cpu-timers.c time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
posix-timers.c time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
sched_clock.c sched_clock: Remove deprecated setup_sched_clock() API 2014-04-22 13:38:33 -07:00
tick-broadcast-hrtimer.c tick: Fixup more fallout from hrtimer broadcast mode 2014-02-09 15:11:47 +01:00
tick-broadcast.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-01 11:00:07 -07:00
tick-common.c tick-common: Fix wrong check in tick_check_replacement() 2014-04-15 20:26:44 +02:00
tick-internal.h time: Fixup fallout from recent clockevent/tick changes 2014-02-07 16:00:46 +01:00
tick-oneshot.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-sched.c tick-sched: Check tick_nohz_enabled in tick_nohz_switch_to_nohz() 2014-04-15 20:26:58 +02:00
time.c time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
timeconst.bc time/timers: Move all time(r) related files into kernel/time 2014-06-23 11:22:35 +02:00
timeconv.c time: add function to convert between calendar time and broken-down time for universal use 2009-09-24 07:20:56 -07:00
timekeeping.c timekeeping: use printk_deferred when holding timekeeping seqlock 2014-06-04 16:54:17 -07:00
timekeeping_debug.c kernel: Include appropriate header file in time/timekeeping_debug.c 2014-03-02 20:52:58 -08:00
timekeeping_internal.h power: Add option to log time spent in suspend 2013-05-29 12:57:34 -07:00
timer.c timer: Kick dynticks targets on mod_timer*() calls 2014-06-23 11:23:47 +02:00
timer_list.c timer_list: correct the iterator for timer_list 2013-08-28 19:26:38 -07:00
timer_stats.c timer stats: Add a 'Collection: active/inactive' line to timer usage statistics 2013-10-10 09:59:25 +02:00