[PATCH v2 4/4] hv_util: improve time adjustment accuracy by disabling interrupts

Stephen Hemminger stephen at networkplumber.org
Thu Jan 5 17:39:13 UTC 2017


On Thu, 05 Jan 2017 13:35:58 +0100
Vitaly Kuznetsov <vkuznets at redhat.com> wrote:

> I was thinking about it but to me what do_adjtimex() does looks too
> low-level for drivers (e.g. calling write_seqcount_begin(),
> __timekeeping_set_tai_offset(), tk_update_leap_state()). To me (again, I
> probably know not that much about time keeping) it looks like we'll have
> to have all this stuff around the __do_adjtimex() call here.
> 
> Are there any particular concearns on calling do_adjtimex() directly?

With out holding timekeeper_lock, I don't see how you can do the adjtime
atomically.  The userspace NTP doesn't worry about it, but in the kernel
you can be more accurate. But to do that you would need to write a new
function that is kernel specific.


More information about the devel mailing list