[CentOS-virt] patched kernel addressing timekeeping issues under vmware

Fri Dec 5 21:09:27 UTC 2008
Akemi Yagi <amyagi at gmail.com>

People at vmware have provided patches for RHEL 5 that aim to fix
timekeeping issues in vmware guests.

https://bugzilla.redhat.com/show_bug.cgi?id=463573

Description of problem (excerpt) :

"In a virtual environment, timekeeping for RHEL 64 bit kernels can be
problematic, since time is kept by counting timer interrupts for this kernel.

The problem arises when the VM is descheduled for some portion of time.  When
the VM is rescheduled, the hypervisor needs to "catch up" delivering timer
interrupts so that the kernel can determine the correct time.

Until the VM is caught up, the kernel's time will be behind, causing
short term divergence of the kernel's time with wallclock time.
Additionally, under certain overcommitment conditions, it may not be
possible for the hypervisor to fully catch up.  In this case, the kernel
time can fall behind over the long term.

The solution is to change the kernel's timekeeping algorithm to keep
time based on how much time has elapsed according to a time counter
rather than by counting interrupts.  This is similar to the timeofday
algorithm used by clocksource enabled mainline kernels or the RHEL5
32bit kernel."

They were hoping to get them into the RHEL 5.3 kernel but
unfortunately this is not going to happen.  It looks like the patches
will be in the RHEL 5.4 kernel.  Using the patches provided in the
bugzilla, I have rebuilt the latest test kernel (-125) that is
available from http://people.redhat.com/dzickus.  You can download the
patched kernel from:

http://centos.toracat.org/kernel/centos5/vmware463573/

I have test-installed it on a couple of CentOS-5 x86_64 guests.  Still
too early to say anything about the clock issue, but so far so good.
If you get a chance to give it a try, please share what you find.

Thanks,

Akemi
(nick: toracat)