From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [PATCH] kvmclock: Ensure time in migration never goes backward Date: Wed, 7 May 2014 20:23:27 -0300 Message-ID: <20140507232327.GB25225@amt.cnet> References: <1399297882-3444-1-git-send-email-agraf@suse.de> <20140505232343.GA20638@amt.cnet> <20140505233120.GA23113@amt.cnet> <53688CC3.7040001@suse.de> <53693DFB.3080108@beyond.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Alexander Graf , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Marcin =?utf-8?Q?Gibu=C5=82a?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbaEGXXq (ORCPT ); Wed, 7 May 2014 19:23:46 -0400 Content-Disposition: inline In-Reply-To: <53693DFB.3080108@beyond.pl> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 06, 2014 at 09:54:35PM +0200, Marcin Gibu=C5=82a wrote: > >Yes, and it isn't. Any ideas why it's not? This patch really just us= es > >the guest visible kvmclock time rather than the host view of it on > >migration. > > > >There is definitely something very broken on the host's side since i= t > >does return a smaller time than the guest exposed interface indicate= s. >=20 > Don't know if helps but here are example values from > time_at_migration and s->clock from your patch. >=20 > Tested on 5 restores of saved VM that (used to) hang: >=20 > s->clock time_at_migration > 157082235125698 157113284546655 > 157082235125698 157113298196976 > 157082235125698 157113284615117 > 157082235125698 157113284486601 > 157082235125698 157113284479740 >=20 > Now, when I compare system time on guest with and without patch: >=20 > On unpatched qemu vm restores with date: Apr 18 06:56:36 > On patched qemu it says: Apr 18 06:57:06 >=20 > --=20 > mg Marcin, Can you turn off the TSC clock on the host and attempt to reproduce the= =20 issue, without Alexander's patch?=20 Just=20 echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocks= ource (or any other clock except tsc if you don't have hpet). TIA.