• Miroslav Lichvar's avatar
    timekeeping: Update multiplier when NTP frequency is set directly · b061c7a5
    Miroslav Lichvar authored
    When the NTP frequency is set directly from userspace using the
    ADJ_FREQUENCY or ADJ_TICK timex mode, immediately update the
    timekeeper's multiplier instead of waiting for the next tick.
    
    This removes a hidden non-deterministic delay in setting of the
    frequency and allows an extremely tight control of the system clock
    with update rates close to or even exceeding the kernel HZ.
    
    The update is limited to archs using modern timekeeping
    (!ARCH_USES_GETTIMEOFFSET).
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Miroslav Lichvar <mlichvar@redhat.com>
    Cc: Richard Cochran <richardcochran@gmail.com>
    Cc: Prarit Bhargava <prarit@redhat.com>
    Cc: Stephen Boyd <sboyd@kernel.org>
    Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    b061c7a5
timekeeping.c 65.8 KB