Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 14:20:40 +0100
From:      Martin Sugioarto <martin@sugioarto.com>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: Timekeeping in stable/9
Message-ID:  <20120121142040.1805e2ed@zelda.sugioarto.com>
In-Reply-To: <4F1AAFFD.7070303@FreeBSD.org>
References:  <20120118075049.289954e8@zelda.sugioarto.com> <mailpost.1327137575.1997238.49263.mailing.freebsd.stable@FreeBSD.cs.nctu.edu.tw> <4F1AAFFD.7070303@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/wodxOEI3Z8kWpGqu6x6TCIC
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Am Sat, 21 Jan 2012 14:30:53 +0200
schrieb Alexander Motin <mav@FreeBSD.org>:

Hi Alexander,

> I am not using VirtualBox right now, so I'll need to setup it to test=20
> this. Meanwhile you could try to experiment with switching to
> different timecounters and eventtimers. May be some change in 9.0
> changed default timecounter for you, causing the problem.

I think we have a misunderstanding here. The host (FreeBSD 9.0R) works
fine. The time is being updated under heavy load without problems.

I already said that this seems to be an application problem and this
email(s) should be rather seen by the VBox maintainer. The problem is
that VBox seems to stop working properly when you put heavy CPU load on
the host. It even does not keep the clock up-to-date.

I can desync the guest clock to -1 minute in a few seconds, just by
running "openssl speed -multi 20".

> timecounter wrap should be the main cause of time drift (if
> timecounter hardware is emulated correctly at all). Different
> timecounters have different wrap periods that can be calculated by
> dividing kern.timecounter.tc.X.mask on
> kern.timecounter.tc.X.frequency. In my case there are: 300s for HPET,
> 5s for ACPI-fast, 2s for TSC and 55ms for i8254. If system won't get
> timer interrupts within half of that time -- time will drift. Start
> from looking what you are using and how good it is in your case.

This is my current timecounter setting:
kern.timecounter.choice: TSC-low(1000) HPET(950) i8254(0)
ACPI-fast(900) dummy(-1000000)
kern.timecounter.hardware: TSC-low
kern.timecounter.tc.ACPI-fast.mask: 16777215
kern.timecounter.tc.ACPI-fast.counter: 10400371
kern.timecounter.tc.ACPI-fast.frequency: 3579545
kern.timecounter.tc.ACPI-fast.quality: 900
kern.timecounter.tc.i8254.mask: 65535
kern.timecounter.tc.i8254.counter: 41849
kern.timecounter.tc.i8254.frequency: 1193182
kern.timecounter.tc.i8254.quality: 0
kern.timecounter.tc.HPET.mask: 4294967295
kern.timecounter.tc.HPET.counter: 3255982446
kern.timecounter.tc.HPET.frequency: 14318180
kern.timecounter.tc.HPET.quality: 950
kern.timecounter.tc.TSC-low.mask: 4294967295
kern.timecounter.tc.TSC-low.counter: 1587561917
kern.timecounter.tc.TSC-low.frequency: 8593928
kern.timecounter.tc.TSC-low.quality: 1000
kern.timecounter.smp_tsc: 1
kern.timecounter.invariant_tsc: 1

I can try other timer counter settings, if you think it will improve
responsivity inside VBox guest.

--
Martin

--Sig_/wodxOEI3Z8kWpGqu6x6TCIC
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQIcBAEBAgAGBQJPGruzAAoJEF8wvLx/5p/7wfIP/0kJOte5etn1PMUjP0OcdC13
UyDooq76PAloAPn7eFbnPX52YQgOzlGzg6gAtX5ut6xHhgbtoWJFSLk0o4Edhz/O
npZ9wZDJ5vt5BvRa1eyTMxhxfgN91rLiPVkPe5VHQFUmezAzHSgX/i9LjAb2VQAh
kJMIfoG+MKAo/qaoR7+8lNSn79ZPJJmKYOnpwn2RvBQ7x9KyMZUR62v8TX0cpwKL
XEROvvMj5S9B4ikSpBwyPnFS473AOmx+LKL5/vosYxpT8HBxXfwuUp/iFz1G7BMG
PI2ybdwzgqnzdneHV3eM26VeuvNmi4C0XvcqEimqkMsRtl12bz+s80flNcs4Y+s/
09WTDS13eTigGHsprmeAjkqsYcq4HtuLOpFnV5bOqczp5cLMFYaBKnKMAs+P4683
rkPYfj/bxp7zQHASCEQs9cb/mMRPBtlluKxL46d06GpnOb+DIPvsKzOS5o3PX0sO
DYYZUR6BcRNwAd5ExI3s5QE/Sa2FQsO0lSaYaUrfPhrhbBwtw8ZEiUEcFTY8PXMX
xrahI2IDjnzN63KhTJCBUp5yU6wgelyJAsW+cpsEqIE0T34EVp9DVm8YImkvOT7u
rPEXHmakkDcgAfczvtnyGUqNQPhPp2cF/mprv6Wh0X/GkYgkJvKW120f8PS/jBUC
QTEwwV1Qfb24765zMaoY
=nTKx
-----END PGP SIGNATURE-----

--Sig_/wodxOEI3Z8kWpGqu6x6TCIC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120121142040.1805e2ed>