Re: [PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()

2014-10-22 Thread Mike Surcouf
> 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

Re: [PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()

2014-10-22 Thread Mike Surcouf
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

Re: [PATCH 2/2] hyperv: Implement Time Synchronization using host time sample

2014-10-14 Thread Mike Surcouf
>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

Re: [PATCH 2/2] hyperv: Implement Time Synchronization using host time sample

2014-10-14 Thread Mike Surcouf
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

Re: [PATCH 2/2] hyperv: Implement Time Synchronization using host time sample

2014-10-14 Thread Mike Surcouf
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.

Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
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?

Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
>> 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

Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
> +/* 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

Re: Time keeps on slipping... on Hyper-V

2014-09-26 Thread Mike Surcouf
> 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