[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Qemu-devel] QEMU on windows timing problems

From: Dor Laor
Subject: RE: [Qemu-devel] QEMU on windows timing problems
Date: Thu, 21 Jun 2007 13:20:22 -0700

>I have a problem with time drifting inside the QEMU machine (running
>XP SP2). This is more visible as the load inside the VM increases
>(heavy hard-disk activity, almost 100% CPU usage). However, I need to
>control some actions inside the VM machine which depend on time. Any
>idea how I can increase QEMU's time resolution, to make it more exact?
>I need something on the order of seconds. For example, on the latest
>tests that I've done, in a total run of 7 minutes QEMU's clock lagged
>by 4 minutes (so it's ~50% slower than real time).
>Host machine x86, Windows, with kqemu installed. I mention that the
>problem is much worse when I run QEMU in a SMP environment, but it is
>fixable by setting process affinity to specific CPUs.

I checked the problem with/without KVM and got identical results.
The problem source is that qemu relays on SIGALARM for qemu - timer, not
only the signal does not arrive on time, several signals may unit.
Relaying on PIT source clock makes the problem worse because several PIT
interrupts might got unified too.

- (Works foe second granularity) Use dyn-tick enabled kernel (the latest
i386 kernel or patched 2.6.22 for 64 bit).
- (Simple, not elegant workaround) Measure the PIT frequency and make
sure that X PIT irqs are acknowledged 
- (best solution) Use dyn-tick kernel + implement qemu dyn-tick timer.
HTH,    Dor.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]