From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: [patch 0/3] synchronized TSC between vcpu's on SMP guests Date: Wed, 10 Dec 2008 01:48:34 +0300 Message-ID: <493EF5C2.3060603@msgid.tls.msk.ru> References: <20081209011247.570596925@localhost.localdomain> <493E58A0.8080109@msgid.tls.msk.ru> <20081209104744.GA8611@dmt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm@vger.kernel.org, Benjamin Serebrin To: Marcelo Tosatti Return-path: Received: from hobbit.corpit.ru ([81.13.33.150]:22611 "EHLO hobbit.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754708AbYLIWsh (ORCPT ); Tue, 9 Dec 2008 17:48:37 -0500 In-Reply-To: <20081209104744.GA8611@dmt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: > On Tue, Dec 09, 2008 at 02:38:08PM +0300, Michael Tokarev wrote: >> Marcelo Tosatti wrote: >>> Most Intel hosts are supposed to have their TSC's synchronized. This >>> patchset attempts to fix the sites which overwrite the TSC making them >>> appear unsynchronized to the guest. >> By the way, phenoms are also supposed to have synced TSCs, at least >> the host reports TSC syncronization works. But guests still thinks >> TSC is unstable, even on uniprocessor guests using kvm_clock... > > On uniprocessor guests? Perhaps, if the guest uses the vmmouse for > example. In such case, is the TSC reported unstable right after boot? Hm. I see "TSC unsyncronized" messages on a bare linux-2.6.27 guests, without anything but virtio_{blk,net} loaded. "Uniprocessor guests" - I mean, a guest that has only one CPU, not necessary kernel that only supports one CPU. Here are some lines from dmesg when booting a guest on a phenom machine: Dec 4 19:17:42 iserv kernel: kvm-clock: cpu 0, msr 0:3d0801, boot clock Dec 4 19:17:42 iserv kernel: SMP: Allowing 8 CPUs, 7 hotplug CPUs Dec 4 19:17:42 iserv kernel: NR_CPUS: 8, nr_cpu_ids: 8, nr_node_ids 1 Dec 4 19:17:42 iserv kernel: kvm-clock: cpu 0, msr 0:180b801, primary cpu clock Dec 4 19:17:42 iserv kernel: TSC: Unable to calibrate against PIT Dec 4 19:17:42 iserv kernel: TSC: using PMTIMER reference calibration Dec 4 19:17:42 iserv kernel: SMP alternatives: switching to UP code Dec 4 19:17:42 iserv kernel: Booting paravirtualized kernel on KVM Dec 4 19:17:42 iserv kernel: Processing INITRAMFS Dec 4 19:17:42 iserv kernel: loading module virtio_pci Dec 4 19:17:42 iserv kernel: EXT3 FS on vda, internal journal Dec 4 19:26:24 iserv kernel: Clocksource tsc unstable (delta = -126732353 ns) (Note the time difference between last and all previous lines. At this time, there are only 5 user processes running. Like this: 1 ? Ss 0:04 init [2] 791 ? Ss 0:00 /sbin/syslogd 800 ? Ss 0:00 /sbin/klogd -x 845 ? Ss 0:00 /usr/sbin/unbound 6423 tty1 Ss+ 0:00 /sbin/getty 38400 tty1 (it's not real example but close). Linux iserv 2.6.27-i686smp #2.6.27.7 SMP Fri Nov 21 13:24:19 MSK 2008 i686 GNU/Linux kvm-79. Thanks! /mjt