• Thomas Gleixner's avatar
    hrtimer: Avoid more SMP function calls in clock_was_set() · 1e7f7fbc
    Thomas Gleixner authored
    By unconditionally updating the offsets there are more indicators
    whether the SMP function calls on clock_was_set() can be avoided:
    
      - When the offset update already happened on the remote CPU then the
        remote update attempt will yield the same seqeuence number and no
        IPI is required.
    
      - When the remote CPU is currently handling hrtimer_interrupt(). In
        that case the remote CPU will reevaluate the timer bases before
        reprogramming anyway, so nothing to do.
    
      - After updating it can be checked whether the first expiring timer in
        the affected clock bases moves before the first expiring (softirq)
        timer of the CPU. If that's not the case then sending the IPI is not
        required.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210713135158.887322464@linutronix.de
    1e7f7fbc
hrtimer.c 66.1 KB