Hi,
In lowres mode, hrtimers are serviced by the tick. But when a hrtimer is enqueued on a idle or full dynticks target, we need to kick it in order to make it reconsider the next tick to schedule, to correctly handle the hrtimer's expiring time.
Now while this kick is correctly performed for periodic timers, hrtimers were a bit neglected.
get_nohz_timer_target() doesn't return a remote idle target but there is a small race window here. 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 hrtimer on a dynticks idle destination without kicking it. As a result, the hrtimer might be serviced too late in the future.
Also a target elected by get_nohz_timer_target() 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.
This patchset should fix all these issues.
git://git.linaro.org/people/viresh.kumar/linux.git missing-kick
Similar problems with timers were fixed and sent to LKML earlier: https://lkml.org/lkml/2014/6/12/588
(Yeah, I stole logs from there :) )
Viresh Kumar (3): hrtimer: Store cpu-number in 'struct hrtimer_cpu_base' hrtimer: Kick lowres dynticks targets on hrtimer_start*() calls hrtimers: don't check hres_active before calling hrtimer_reprogram()
include/linux/hrtimer.h | 2 ++ kernel/hrtimer.c | 49 +++++++++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 22 deletions(-)