]> asedeno.scripts.mit.edu Git - linux.git/commit
timekeeping: Update multiplier when NTP frequency is set directly
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 4 Jun 2018 13:34:21 +0000 (15:34 +0200)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 10 Jul 2018 19:44:25 +0000 (12:44 -0700)
commitb061c7a513afe14a68af41cec7c3476befc40e95
tree7ba281cefc23a75880c3c128e9b9250fa2213997
parent1416270f4a1ae83ea84156ceba19a66a8f88be1f
timekeeping: Update multiplier when NTP frequency is set directly

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: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c