• V
    hrtimer: Kick lowres dynticks targets on timer enqueue · 49a2a075
    Viresh Kumar 提交于
    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: NViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
    Link: http://lkml.kernel.org/r/3d7ea08ce008698e26bd39fe10f55949391073ab.1403507178.git.viresh.kumar@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
    49a2a075
hrtimer.c 48.5 KB