On Wed, 2007-06-13 at 11:48 +0300, Avi Kivity wrote:
> Zhao, Yunfeng wrote:
> > Hi,
> > We ran a testing against latest KVM to know its quality status.
> > In the testing we tried to boot guests, test basic devices of guest, and
> > install guests.
> >   
> 
> Thanks for doing this -- it is enormously useful.
> 
> > Basic devices, Keybord,disk,VGA, and nic works well, but timer is NOT
> > accurate while running some workload on guests.
> >   
> 
> We found that using an hrtimer enabled host with CONFIG_HZ=1000 improves 
> things.  However I don't think that it's as accurate as 7 seconds in 20 
> minutes (that's better than 1% accuracy), so probably more work is 
> needed in qemu to correct time drift.
> 
> 
> 

One of the things that I noticed during the development of the APIC
patchset that was quite odd:

1) Linux guest was programming the PIT for 4ms.
2) QEMU was programming the sigalarm for 1ms
3) SIGALARM was only delivered every 8ms (probably maximum resolution
with this setup) so the timer-wheel injected two PIT interrupts per
SIGALARM.
4) Since PICs can generally only queue a single interrupt, the second
tick was always lost.

HOWEVER (and this is where it gets really weird), linux wallclock time
in the guest runs at normal speed even with PIT at 1/2 freq.  If I made
corrections such that every PIT tick is actually delivered to the guest,
wallclock runs at 2x.

So aside from the fact that I know we are losing at least 50% of our
ticks, it seems that something else was hacked to accommodate it somehow
(perhaps the RTC emulation?).

Hopefully this information might be useful to someone who wishes to
tackle the problem.

-Greg




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to