• A
    hrtimer: Make hrtimer_cpu_base.next_timer handling unconditional · eb27926b
    Anna-Maria Gleixner 提交于
    hrtimer_cpu_base.next_timer stores the pointer to the next expiring timer
    in a CPU base.
    
    This pointer cannot be dereferenced and is solely used to check whether a
    hrtimer which is removed is the hrtimer which is the first to expire in the
    CPU base. If this is the case, then the timer hardware needs to be
    reprogrammed to avoid an extra interrupt for nothing.
    
    Again, this is conditional functionality, but there is no compelling reason
    to make this conditional. As a preparation, hrtimer_cpu_base.next_timer
    needs to be available unconditonally.
    
    Aside of that the upcoming support for softirq based hrtimers requires access
    to this pointer unconditionally as well, so our motivation is not entirely
    simplicity based.
    
    Make the update of hrtimer_cpu_base.next_timer unconditional and remove the
    #ifdef cruft. The impact on CONFIG_HIGH_RES_TIMERS=n && CONFIG_NOHZ=n is
    marginal as it's just a store on an already dirtied cacheline.
    
    No functional change.
    Signed-off-by: NAnna-Maria Gleixner <anna-maria@linutronix.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: keescook@chromium.org
    Link: http://lkml.kernel.org/r/20171221104205.7269-17-anna-maria@linutronix.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
    eb27926b
hrtimer.c 46.2 KB