Bug 998108

Summary: Let's enable kvmclock in RHEL 6
Product: Red Hat Enterprise Linux 6 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: bfan, leiwang, lkong, rjones, walters, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.20.10-3.el6 Doc Type: Bug Fix
Doc Text:
Cause: Using libguestfs on heavily loaded machines. Consequence: You might see messages about "unstable clocks" appearing, especially in debugging output. Fix: Ensure that kvmclock is enabled. Result: Messages about "unstable clocks" should be reduced or eliminated by this change.
Story Points: ---
Clone Of: 998065
: 998109 (view as bug list) Environment:
Last Closed: 2013-11-21 04:46:52 UTC Type: Bug
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: 998109    

Description Richard W.M. Jones 2013-08-17 09:36:34 UTC
+++ This bug was initially created as a clone of Bug #998065 +++

Upstream we switched over to using kvmclock (038ed0a08e & c53b459fdd).
We should do so in RHEL too since it would avoid most of
the trouble with clock instability.

https://github.com/libguestfs/libguestfs/commit/038ed0a08eaed33e62a27c9f91780a25de0bc08c
https://github.com/libguestfs/libguestfs/commit/c53b459fdd7fc340f48a76496b7e7e18256a2d64

Comment 1 bfan 2013-09-02 03:10:26 UTC
Hello Rich,
Could you tell me how can I tell it works?  I only find some message from boot debug logs.

"    
    -cpu host,+kvmclock \
    ...
    kvm-clock: Using msrs 4b564d01 and 4b564d00
    kvm-clock: cpu 0, msr 0:1c247c1, boot clock
    kvm-clock: cpu 0, msr 0:22167c1, primary cpu clock
    [    0.381003] Switching to clocksource kvm-clock
"
Is it enough?

Comment 2 Richard W.M. Jones 2013-09-02 14:33:46 UTC
(In reply to bfan from comment #1)
> Hello Rich,
> Could you tell me how can I tell it works?

https://rwmj.wordpress.com/2010/10/15/kvm-pvclock/#content

> I only find some message from
> boot debug logs.
> 
> "    
>     -cpu host,+kvmclock \
>     ...
>     kvm-clock: Using msrs 4b564d01 and 4b564d00
>     kvm-clock: cpu 0, msr 0:1c247c1, boot clock
>     kvm-clock: cpu 0, msr 0:22167c1, primary cpu clock
>     [    0.381003] Switching to clocksource kvm-clock
> "
> Is it enough?

This is sufficient to verify the bug fix IMHO.

Comment 4 bfan 2013-10-21 08:06:59 UTC
Verify this bug according to #comment 2
libguestfs-1.20.11-2.el6.x86_64

[root@dhcp-9-42 home]# guestfish -x -v -N fs > boot.log 2>&1
[root@dhcp-9-42 home]# cat boot.log | grep -Ei "kvmclock|kvm-clock"
    -cpu host,+kvmclock \
kvm-clock: Using msrs 4b564d01 and 4b564d00
kvm-clock: cpu 0, msr 0:1c247c1, boot clock
kvm-clock: cpu 0, msr 0:22167c1, primary cpu clock
[    0.153354] Switching to clocksource kvm-clock

So change the status to verified

Comment 6 errata-xmlrpc 2013-11-21 04:46:52 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-2013-1536.html