Bug 745713

Summary: command-line clocksource override fails
Product: Red Hat Enterprise Linux 6 Reporter: Paolo Bonzini <pbonzini>
Component: kernelAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: areis, arozansk, byu, drjones, jruemker, juzhang, jzheng, kzhang, leiwang, lersek, mrezanin, pbonzini, qguan, qwan, tburke, xen-maint, yuzhang, yuzhou
Target Milestone: rcKeywords: ReleaseNotes
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-229.el6 Doc Type: Bug Fix
Doc Text:
In some cases, Red Hat Enterprise Linux 6 guests running fully-virtualized under Red Hat Enterprise Linux 5 experience time drift or fail to boot. In other cases, drifting may start after migration of the virtual machine to a host with different speed. This is due to limitations in the Red Hat Enterprise Linux 5 Xen hypervisor. To work around this, add "nohpet" or alternatively "clocksource=jiffies" to the kernel command line for the guest. Or, if running under Red Hat Enterprise Linux 5.7 or newer, locate the guest configuration file for the guest and add "hpet=0" there.
Story Points: ---
Clone Of: 661211 Environment:
Last Closed: 2012-06-20 07:57:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 661211, 767187, 1300182    

Description Paolo Bonzini 2011-10-13 07:37:58 UTC
The command line clocksource override with acpi_pm timer fails:
    
     hpet clockevent registered
     Switching to clocksource hpet
     Override clocksource acpi_pm is not HRT compatible.
     Cannot switch while in HRT/NOHZ mode.
    
This is problematic for Xen hosts: when the host has a bad TSC, the guest may fail to boot unless the clocksource is overridden with acpi_pm.  While there is a workaround (clocksource=jiffies) it has worse performance and resolution.

The patch is simple, has been in 2.6.32 longterm kernels since May, and has already been tested by QE.

Comment 1 RHEL Program Management 2011-10-13 07:51:11 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 2 Andrew Jones 2011-10-13 14:51:52 UTC
Looks like we won't be able to get this into 6.2 this late. We need to update the tech note in bug 661211 comment 50.

Comment 6 RHEL Program Management 2011-12-13 04:37:36 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 7 Rik van Riel 2012-01-09 21:57:23 UTC
*** Bug 722486 has been marked as a duplicate of this bug. ***

Comment 8 Aristeu Rozanski 2012-02-10 19:29:30 UTC
Patch(es) available on kernel-2.6.32-229.el6

Comment 16 Andrew Jones 2012-04-27 10:43:03 UTC
I took a look at the boot log. It's the same problem as before
...
Measured 2391259932 cycles TSC warp between CPUs, turning off TSC clock.
HPET: 3 timers in total, 0 timers will be used for per-cpu timer
Switching to clocksource hpet
...
Override clocksource acpi_pm is not HRT compatible. Cannot switch while in HRT/NOHZ mode
...soft lockups...

And adding nohpet to the command line still allows the boot to succeed. Since the patch that is supposed to fix this is still there, then it either never worked, or something broke it again.

For 6.3 a release note is sufficient for this problem though, as it's machine dependant and not customer/partner reported. Using the same release note as for bug 661211, but removing the "add "clocksource=acpi_pm" option, should do it.

Comment 17 Andrew Jones 2012-04-27 10:48:53 UTC
Adding "add nohpet" as an option also to the release note.

Comment 18 Andrew Jones 2012-04-27 10:48:54 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In some cases, Red Hat Enterprise Linux 6 guests running fully-virtualized under Red Hat Enterprise Linux 5 experience time drift or fail to boot.  In other cases, drifting may start after migration of the virtual machine to a host with different speed.  This is due to limitations in the Red Hat Enterprise Linux 5 Xen hypervisor.  To work around this, add "nohpet" or alternatively "clocksource=jiffies" to the kernel command line for the guest.  Or, if running under Red Hat Enterprise Linux 5.7 or newer, locate the guest configuration file for the guest and add "hpet=0" there.

Comment 19 Andrew Jones 2012-04-27 10:50:03 UTC
Paolo, please ack if you agree. Thanks.

Comment 20 Paolo Bonzini 2012-05-02 12:38:19 UTC
Yes, that's good.

Comment 22 errata-xmlrpc 2012-06-20 07:57:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0862.html