[PATCHv1] timekeeping: Update multiplier when NTP frequency is set directly

2018-05-29 Thread Miroslav Lichvar
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

Re: [PATCHv1] timekeeping: Update multiplier when NTP frequency is set directly

2018-06-04 Thread Miroslav Lichvar
On Tue, May 29, 2018 at 10:42:05AM -0700, John Stultz wrote: > On Tue, May 29, 2018 at 3:53 AM, Miroslav Lichvar wrote: > > -void update_wall_time(void) > > +static void timekeeping_advance(bool force_update) > > This is kind of a nit, but mind switching out bool for an enum? Using > something l

Re: [PATCHv1] timekeeping: Update multiplier when NTP frequency is set directly

2018-05-29 Thread John Stultz
On Tue, May 29, 2018 at 3:53 AM, Miroslav Lichvar wrote: > 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 dela