Re: ntpd clock unsynced in vm

2017-07-18 Thread Theo de Raadt
> If your clock drift is worse than that, your clock is broken.  Which
> alas is the case for vm.

I agree with this statement.

About 20 years ago, I defined the minimum system we attempt to run well
on as IPL32 or I32LP64, with a MMU.

Soon this was redefined as with an FPU as well, after which I observed
valiant painful efforts to do softfpu on arm, causing much grief and
pain and showing that FPU is needed.

A while back we realized that a proper RTC is mandated.  Some people
still want to accept cheap hardware sold without an RTC.

Those people will learn their lesson.

At present, vmm is also weak in this area, not regarding the RTC, but
regarding syncronous clock deliver.  Mike will fix that eventually.



Re: ntpd clock unsynced in vm

2017-07-18 Thread Christian Weisgerber
On 2017-07-18, tomr  wrote:

> In playing with vmd, I'm unable to get the guest's ntpd to sync to its
> upstream ntp (whether that's the host ntpd or poot.ntp.org). The guest
> is losing about 1 second for every 2 that pass.

To build a bridge between this question and Mike's reply:
This problem has nothing to do with ntpd.  ntpd's ability to adjust
the clock is limited by adjtime(), which can correct time up to a
generous maximum of 5 milliseconds for each second.  If your clock
drift is worse than that, your clock is broken.  Which alas is the
case for vm.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: ntpd clock unsynced in vm

2017-07-18 Thread Mike Larkin
On Tue, Jul 18, 2017 at 08:45:04PM +1000, tomr wrote:
> Good time-of-day,
> 
> In playing with vmd, I'm unable to get the guest's ntpd to sync to its
> upstream ntp (whether that's the host ntpd or poot.ntp.org). The guest
> is losing about 1 second for every 2 that pass. I'm using a recent
> snapshot on both host and guest on a 1st gen thinkpad X1 carbon (dmesgs
> below).
> 

This is a known issue that we have been working (slowly) to resolve. There
are several things contributing to this and we have been knocking them down
one at a time. It's better than it has been, but worse than it should be.

For now, a 1000HZ host *may* make a difference for you but it's probably
still not going to keep perfect time and it's just a workaround anyway.

-ml