From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: Timedrift in KVM guests after livemigration. Date: Sun, 18 Apr 2010 00:17:26 +0400 Message-ID: <4BCA1756.6060800@msgid.tls.msk.ru> References: <4BC6C1B1.5010206@monsternett.no> <4BCA1164.1030808@monsternett.no> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Espen Berg Return-path: Received: from isrv.corpit.ru ([81.13.33.159]:58664 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753457Ab0DQUR2 (ORCPT ); Sat, 17 Apr 2010 16:17:28 -0400 In-Reply-To: <4BCA1164.1030808@monsternett.no> Sender: kvm-owner@vger.kernel.org List-ID: 17.04.2010 23:52, Espen Berg wrote: > Den 15.04.2010 09:35, skrev Espen Berg: >> We have three KVM hosts that supports live-migration between them, but >> one of our problems is time drifting. The three frontends has different >> CPU frequency and the KVM guests adopt the frequency from the host >> machine where it was first started. What do you mean by "adopts" ? Note that the cpu frequency means nothing for all the modern operating systems, at least since the days of common usage of MS-DOS which relied on CPU frequency for its time functions. All interesting things are now done using timers instead, and timers (which don't depend on CPU frequency again) usually work quite well. What complicates things is that the most cheap and accurate enough time source is TSC (time stamp counter register in the CPU), but it will definitely be different on each machine. For that, 0.12.3 kvm and 2.6.32 kernel (I think) introduced a compensation. See for example -tdf kvm option. [] >> Is there any solution to our problems, or is a reboot the only safe >> solution? Well, reboot is definitely a safe solution. > Is there no one with similar problems here? :\ Guess I should file a bug > report or something if the same problems occur in the latest version. I > can't se any changes in change log after 0.11.x that relate to this > problem. We can't be the only one that uses different CPUs in a > migration environment. Actually there is a difference in 0.12. > Since this is a cluster in production, I'm not able to try the latest > version either. Well, that's difficult one, no? It either works or not. If you can't try anything else, why to ask? :) /mjt