From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47663 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl6f3-0000mX-1z for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:24:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl6f1-0000nd-Be for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:24:16 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:53576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl6f0-0000nB-Ut for qemu-devel@nongnu.org; Thu, 03 Feb 2011 16:24:15 -0500 Message-ID: <4D4B1CF8.8040800@web.de> Date: Thu, 03 Feb 2011 22:24:08 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC: 0/2] patch for QEMU HPET periodic timer emulation to alleviate time drift References: <480481933.225059.1296734409954.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <1375835067.226263.1296740625327.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4D4AC99A.2070803@siemens.com> <4D4B0B07.2040904@codemonkey.ws> In-Reply-To: <4D4B0B07.2040904@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig478968F9E5333DC7E58EFD4C" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel , Glauber Costa , Ulrich Obergfell , kvm , Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig478968F9E5333DC7E58EFD4C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-02-03 21:07, Anthony Liguori wrote: > On 02/03/2011 09:28 AM, Jan Kiszka wrote: >> On 2011-02-03 14:43, Ulrich Obergfell wrote: >> =20 >>> Hi, >>> >>> I am observing severe backward time drift in a MS Windows Vista(tm) >>> guest running on a Fedora 14 KVM host. I can reproduce the problem >>> with the following steps: >>> >>> 1. Use 'vncviewer' to connect to the guest's desktop. >>> 2. Click on the menu title bar of a window on the guest's desktop. >>> 3. Move that window around on the guest's desktop. >>> >>> While I keep on moving the window around for one minute, the guest >>> time falls up to 15 seconds behind host time. >>> >>> The problem is caused by delayed callbacks of hpet_timer(). A timer >>> interrupt is injected into the guest during each callback. However, >>> interrupts are lost if delays are greater than a comparator period. >>> >>> =20 >> Yes, that's a well known limitation of qemu, in fact. We are lacking a= >> generic irq coalescing infrastructure. That, once designed and >> available, would also allow to fix the HPET. >> =20 >=20 > I don't think it requires anything that sophisticated. >=20 > It's just the period calculation of the HPET that's wrong and doesn't > account for loss. Blind (/wrt the guest state) reinjection from the iothread will compensate for lost time of *that* thread but not of the target vcpu(s). So, depending on your workload, you may reduce the drift more or less, but you won't fix it this way. Jan --------------enig478968F9E5333DC7E58EFD4C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk1LHPsACgkQitSsb3rl5xRDOACfTfgFQbNrhyOKRgoXp6WLuXdk y5cAoKElURph89QdpdmobA5nYwaPz6dE =0IbV -----END PGP SIGNATURE----- --------------enig478968F9E5333DC7E58EFD4C--