• Anna-Maria Gleixner's avatar
    hrtimer: Make the remote enqueue check unconditional · 07a9a7ea
    Anna-Maria Gleixner authored
    hrtimer_cpu_base.expires_next is used to cache the next event armed in the
    timer hardware. The value is used to check whether an hrtimer can be
    enqueued remotely. If the new hrtimer is expiring before expires_next, then
    remote enqueue is not possible as the remote hrtimer hardware cannot be
    accessed for reprogramming to an earlier expiry time.
    
    The remote enqueue check is currently conditional on
    CONFIG_HIGH_RES_TIMERS=y and hrtimer_cpu_base.hres_active. There is no
    compelling reason to make this conditional.
    
    Move hrtimer_cpu_base.expires_next out of the CONFIG_HIGH_RES_TIMERS=y
    guarded area and remove the conditionals in hrtimer_check_target().
    
    The check is currently a NOOP for the CONFIG_HIGH_RES_TIMERS=n and the
    !hrtimer_cpu_base.hres_active case because in these cases nothing updates
    hrtimer_cpu_base.expires_next yet. This will be changed with later patches
    which further reduce the #ifdef zoo in this code.
    Signed-off-by: default avatarAnna-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-16-anna-maria@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    07a9a7ea
hrtimer.c 46.4 KB