> Mike, can you share me your kernel version and which Linux distro do you use?
2.6.32-504.el6.x86_64 AKA RHEL 6.6
Happened on centos 7 and 6.5 too.
#cat /var/lib/ntp/drift
-248.869
About 20 secs a day (constant)
Its not a new problem I had this in other distros and other kernels.
I would say its
I get that NTP can be installed locally. This is how I regulate time
on my guests. I agree the admin argument probably doesn't stand up.
The problem is hyperv_clocksource (pluggable time source used by
hyperv guests) is systematically fast in my environment. by around
-250 PPM.
I get away with N
>The value for TICK_USEC is defined as ((100UL + USER_HZ/2) / USER_HZ).
> In my box, it's 1.
OK got it thanks . Checked the algorithm OK by me.
Of course you can only adjust clock by a tick (smallest resolution) so
you could be flapping between 2 values so as you say NTP is preferred.
Howe
Even with networking I think there are other senarios where this would
be useful such as no access to an NTP server due to firewall rules or
no internal NTP or simply an admin without much knowledge of NTP.
HyperV host very likely has good time from AD and it would be good if
the Linux VM just sy
What is your expected value for TICK_USEC? I cant make the arithmetic work.
You double the check time if you are close but you never reduce the
check time if you are not.
Adjusting the tick count is a coarse adjustment of the clock. You
will end up chasing the host time but never stabilizing it.
In CENTOS and RHEL 6 and upwards the official way would be to use
/usr/sbin/tickadj
which is provided by ntp/chrony package
This dependency on user space packages that may or may not be
installed is going to cause a lot of confusion in an already confused
space.
Are we sure theres no other way?
>> What happens when adjtimex is not present?
>> Is there no kernel space function for that?
>> Does this patch affect "not setting correct time on restore" or "not setting
>> correct time on live migration" bug?
>>
>
> If adjtimex is not present, then the slew time part didn't take effect.
> Ther
> +/* helper function to call adjtimex command in user mode */
> +static void run_adjtimex_cmd(s64 tickvalue)
> +{
> + char *argv[4], *envp[3];
> + char str_tickvalue[20];
> +
> + sprintf(str_tickvalue, "%lld", tickvalue);
> +
> + argv[0] = "/sbin/adjtimex";
> + argv[1
> We still recommend user to configure NTP in the guest VM. With the new time
> sync feature in this patch,
> you could have one more option to enable the guest-host sync, if the NTP
> didn't work in the environment.
> For example the guest VM didn't have network connection.
Microsoft used to us