On Mon, Dec 01, 2014 at 17:33, Michał Koc wrote: > Hi All, > > I've got a OpenBSD installation on Microsoft Hyper-V, and there is a > strange issue related to time. > Actually the clock seems to be running fine, but all of the sleep > operations expire 2 times too fast.
> cpu0 at mainbus0: apid 0 (boot processor) > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges > cpu0: apic clock running at 105MHz The clock that determines how long a second is the apic clock, which we attempt to measure at boot time. However, sometimes the reading is done wrong which usually results in a multple of the actual frequency. Actually, it usually results in clocks running at 1/2 or 1/3 speed, not double speed. But it's the same problem. Your apic clock is apparently really running at 200MHz. There was a fix made to the code quite some time ago which resolved the issue on real hardware. I haven't seen it since. But Hyper-V is obviously different. There is no fix or change you can make to change the frequency once determined, but maybe if Hyper-V has some setting for "optimized clock ticks" or whatever, you can fiddle with it.