This bug has been copied from bug #476075 and has been proposed to be backported to 5.4 z-stream (EUS).
in kernel-2.6.18-164.1.1.el5
Test Reboot on AMD Hosts: After rebooting guest. guest is <0.1s faster than host. i686 : PASS ( offset is -0.569655 , -0.569714 , -0.569160 ) x86_64 : PASS ( offset is -0.466835 , -0.587773 , -0.675310 ) raw log is here : http://focus.bne.redhat.com/~lihuang/timekeeping/amd-pv-i686-reboot.txt http://focus.bne.redhat.com/~lihuang/timekeeping/amd-pv-x86_64-reboot.txt
====== Test summary ====== 1 . time drift after boot : (1~2s later than host after starting up, it is a known issue bug 523478 ) 2 . time drift after migration : PASS 3 . time drift after reboot : PASS 4 . Measure time drift in 12 hours. i686 : PASS x86_64 : AMD - offset increase 0.1 sec every 10min Intel - offset increase 0.01 sec every 10min ============================
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1455.html
Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The KVM pvclock code provides a stable source of timing for KVM guests. pvclock does not function on machines that lack the constant_tsc flag. However, some machines that do have the constant_tsc flag may not have a stable Time Stamp Counter (TSC), causing the kvmclock to skew. To work around this issue, boot the kernel with the parameter "clock=pmtimer".
Release note updated. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -The KVM pvclock code provides a stable source of timing for KVM guests. pvclock does not function on machines that lack the constant_tsc flag. However, some machines that do have the constant_tsc flag may not have a stable Time Stamp Counter (TSC), causing the kvmclock to skew. To work around this issue, boot the kernel with the parameter "clock=pmtimer".+The KVM pvclock code provides a stable source of timing for KVM guests. However, on x86_64 based machines that have the constant_tsc flag, the Time Stamp Counter (TSC) may not be stable, causing the kvmclock to skew. To work around this issue, view the Red Hat Knowlegebase article located at <URL to be advised>
Here is a summary of what we agreed upon: + General - When the physical cpu on the host has stable_tsc capability (all new host, > AMD rev-F) it should work well - some issues below. - There is a workaround of the guest kernel cmdline to avoid using pv clock: http://cleo.tlv.redhat.com/qumrawiki/KVM/TimeKeeping It was validated by QE. + Problems - Live migration: We need to make sure that the guest won't notice the clock goes back. We have agreed upon a solution. Glauber working on patches. - i386 rhel5.4 guest Works fine! - 64 bit rhel5.4 guest There is a potential of cavitiy with non stable_tsc hosts. Details: last_tsc variable in the guest is too hard to keep. As long as the tsc on the host (cpu) is stable, there won't be surprises. + Recommendations: - Option 1: Cancel pv clock in rhel5.4 guest I don't recommend it since it does the job and we can always cancel it. The only breakage danger is guest time which might happen without the clock. - Option 2: Allow it only on stable_tsc hosts. It needs migration to be fixed. Most logical. Option 2 was chosen.
Release note updated. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -The KVM pvclock code provides a stable source of timing for KVM guests. However, on x86_64 based machines that have the constant_tsc flag, the Time Stamp Counter (TSC) may not be stable, causing the kvmclock to skew. To work around this issue, view the Red Hat Knowlegebase article located at <URL to be advised>+The KVM pvclock code provides a stable source of timing for KVM guests that supports it. However, there are rare occasions where the kvmclock does not function well when the physical cpu does not support constant_tsc and the guest is i386 (32 bit), causing the kvmclock to skew. To work around this issue, view the Red Hat Knowlegebase article located at <URL to be advised>
Please advise the KB article
(In reply to comment #28) > Please advise the KB article It should be based on the above wiki and VMWare's recommendations. Simon Grinberg is the one to write it.