From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzXvv-0000GM-LM for qemu-devel@nongnu.org; Mon, 10 Nov 2008 09:40:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzXvt-0000FX-Pg for qemu-devel@nongnu.org; Mon, 10 Nov 2008 09:40:03 -0500 Received: from [199.232.76.173] (port=49461 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzXvt-0000FU-JO for qemu-devel@nongnu.org; Mon, 10 Nov 2008 09:40:01 -0500 Received: from mx2.redhat.com ([66.187.237.31]:56277) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzXvt-00012I-Bu for qemu-devel@nongnu.org; Mon, 10 Nov 2008 09:40:01 -0500 Date: Mon, 10 Nov 2008 16:37:50 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [RESEND][PATCH 0/3] Fix guest time drift under heavy load. Message-ID: <20081110143750.GA20617@redhat.com> References: <20081029152236.14831.15193.stgit@dhcp-1-237.local> <20081106081206.GD3820@redhat.com> <4912FAE5.9010100@codemonkey.ws> <200811061424.43689.paul@codesourcery.com> <491301C9.40506@codemonkey.ws> <20081106145142.GA29861@redhat.com> <49130F54.4060907@codemonkey.ws> <20081108083620.GB19381@redhat.com> <491711AB.7000806@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491711AB.7000806@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paul Brook , qemu-devel@nongnu.org On Sun, Nov 09, 2008 at 10:36:59AM -0600, Anthony Liguori wrote: > Gleb Natapov wrote: >> On Thu, Nov 06, 2008 at 09:37:56AM -0600, Anthony Liguori wrote: >> >> >> Yes indeed. With raw image copy benchmark no longer runs enough time to >> produce time drift big enough to be visible. So I ran this disk test >> utility http://69.90.47.6/mybootdisks.com/mybootdisks_com/nu2/bst514.zip >> for ~12 hours and the time drift was 12 secs (if I weren't so lazy and >> wrote bat file to copy c:\windows in a loop I am sure result would be the >> same). This is on completely idle host. >> > > What frequency is the guest running at? If it's running at 100hz, then Windows program RTC to 64hz frequency. > it missed a tick once every 36 seconds. This means that the guest > couldn't run long enough to handle a timer interrupt (which should be a > relatively small number of cycles) in a 10ms period. > 10ms is for qemu + guest, not just guest. > Does this drift go away with the TDF patches? This almost makes me > think that we aren't delivering interrupts at the right frequency and > we're simply accumulating error. In theory, the TDF patches shouldn't > help that. I haven't checked TDF patch yet, but I inserted prints into RTC emulation to check it interrupt are really missed and they are. And after 64 lost interrupts (took slightly more then one hour) the time drift was 1 second, so TDF patches should fix that. > > Otherwise, I'm curious if you have any insight into where we're pausing > for 10ms that's causing the missed interrupt? > Don't know yet. > We could also be missing ticks somehow. I think this warrants further > investigation. > This is not the case from what I observe. -- Gleb.