linux-stable/kernel/time
Viresh Kumar 49a2a07514 hrtimer: Kick lowres dynticks targets on timer enqueue
In lowres mode, hrtimers are serviced by the tick instead of a clock
event. It works well as long as the tick stays periodic but we must also
make sure that the hrtimers are serviced in dynticks mode targets,
pretty much like timer list timers do.

Note that all dynticks modes are concerned: get_nohz_timer_target()
tries not to return remote idle CPUs but there is nothing to prevent
the elected target from entering dynticks idle mode until we lock its
base. It's also prefectly legal to enqueue hrtimers on full dynticks CPU.

So there are two requirements to correctly handle dynticks:

1) On target's tick stop time, we must not delay the next tick further
   the next hrtimer.

2) On hrtimer queue time. If the tick of the target is stopped, we must
   wake up that CPU such that it sees the new hrtimer and recalculate
   the next tick accordingly.

The point 1 is well handled currently through get_nohz_timer_interrupt() and
cmp_next_hrtimer_event().

But the point 2 isn't handled at all.

Fixing this is easy though as we have the necessary API ready for that.
All we need is to call wake_up_nohz_cpu() on a target when a newly
enqueued hrtimer requires tick rescheduling, like timer list timer do.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/3d7ea08ce008698e26bd39fe10f55949391073ab.1403507178.git.viresh.kumar@linaro.org
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 hrtimer: Kick lowres dynticks targets on timer enqueue 2014-06-23 11:23:47 +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
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