| Date | Mon, 7 Dec 2020 13:47:49 +0100 | From | Miroslav Lichvar <> | Subject | Re: [patch 5/8] ntp: Make the RTC synchronization more reliable |
| |
On Sun, Dec 06, 2020 at 10:46:18PM +0100, Thomas Gleixner wrote: > Switch it to an hrtimer instead which schedules the actual update work. The > hrtimer will expire precisely (max 1 jiffie delay when high resolution > timers are not available). The actual scheduling delay of the work is the > same as before.
It works well in my tests.
> This becomes now: > > if (ntp_synced() && !hrtimer_is_queued(&sync_hrtimer)) > queue_work(system_power_efficient_wq, &sync_work, 0); > > which is racy when the hrtimer has expired and the work is currently > executed and has not yet managed to rearm the hrtimer. > > Not a big problem as it just schedules work for nothing.
No more unexpected updates of the RTC observed.
Tested-by: Miroslav Lichvar <mlichvar@redhat.com>
Thanks,
-- Miroslav Lichvar
|