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

[Xen-users] Re: DomU clock out of sync (and Dom0 too)



I may have found a solution: add "clocksource=pit" to Xen command line, e.g.
my Grub2 stanza for booting the Xen server (dom0) is:

/menuentry 'DEFAULT: Debian Squeeze, kernel 2.6.32-5-xen-amd64' {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set
cdd50d18-e2bd-42b3-8042-c9c4d7aedb99
        echo 'Loading Linux 2.6.32-5-xen-amd64 ...'
        multiboot /xen-4.0-amd64.gz placeholder dom0_mem=512M
*clocksource=pit*
        module /vmlinuz-2.6.32-5-xen-amd64 placeholder root=/dev/md2 ro
quiet
        echo 'Loading initial ramdisk ...'
        module /initrd.img-2.6.32-5-xen-amd64
}/

My explanation:

http://lists.xensource.com/archives/html/xen-devel/2011-02/msg01367.html ...
Back in February 2011, Olivier Hanesse reported a TSC bug that caused a time
jump of 50 minutes into the future.  He was using HPET as clock source
(platform timer) and "xm dmesg" showed this entry:

(XEN) TSC has constant rate, deep Cstates possible, so not reliable,
warp=2850 (count=3)

http://lists.xensource.com/archives/html/xen-devel/2011-02/msg01406.html ...
Keir Fraser explained that Xen detects the platform timer counter wrapping
and "to account for that based on trusting the CPU's 64-bit TSC."  An
unreliable TSC may erroneously cause clock jumps.  Using HPET as platform
timer, the clock jump was ~50 minutes.  I theorize 47 seconds is the clock
jump for using ACPI PM as platform timer.  My "xm dmesg" showed:

(XEN) Platform timer is 3.579MHz ACPI PM Timer
...
(XEN) TSC has constant rate, deep Cstates possible, so not reliable,
warp=2870 (count=1)

Keir suggested using PIT platform timer as a workaround.  After booting dom0
with "clocksource=pit", my "xm dmesg" showed:

(XEN) Platform timer is 1.193MHz PIT

It's been 48 hours without any 47sec time jump.  Too soon to declare
victory, but encouraging nonetheless.  I only have one Xen server to test,
so I ask everyone with this problem to try it.  Thank you.

--
View this message in context: 
http://xen.1045712.n5.nabble.com/DomU-clock-out-of-sync-tp4395454p4555976.html
Sent from the Xen - User mailing list archive at Nabble.com.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.