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: Mon, 5 May 2014 20:27:10 -0300 Message-ID: <20140505232710.GB20638@amt.cnet> References: <1399297882-3444-1-git-send-email-agraf@suse.de> <5367CE81.6030506@beyond.pl> <5367D7BC.2040705@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]:37385 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756974AbaEEX1e (ORCPT ); Mon, 5 May 2014 19:27:34 -0400 Content-Disposition: inline In-Reply-To: <5367D7BC.2040705@beyond.pl> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 05, 2014 at 08:26:04PM +0200, Marcin Gibu=C5=82a wrote: > >>is it possible to have kvmclock jumping forward? > >> > >>Because I've reproducible case when at about 1 per 20 vm restores, = VM freezes for couple of hours and then resumes with date few hundreds = years ahead. Happens only with kvmclock. > >> > >>And this patch seems to fix very similar issue so maybe it's all th= e same bug. > > > >I'm fairly sure it is the exact same bug. Jumping backward is like j= umping forward by a biiiiig amount :) >=20 > Hi, >=20 > I've tested your path on my test VM... don't know if it's pure luck > or not, but it didn't hang with over 70 restores. >=20 > The message "KVM Clock migrated backwards, using later time" fires > every time, but VM is healthy after resume. What is the host clocksource? (cat /sys/devices/system/clocksource/clocksource0/current_clocksource).=20 And kernel version? From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhSIN-0003Pz-UU for qemu-devel@nongnu.org; Mon, 05 May 2014 19:27:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhSIH-0001YZ-DF for qemu-devel@nongnu.org; Mon, 05 May 2014 19:27:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhSIH-0001YT-3V for qemu-devel@nongnu.org; Mon, 05 May 2014 19:27:33 -0400 Date: Mon, 5 May 2014 20:27:10 -0300 From: Marcelo Tosatti Message-ID: <20140505232710.GB20638@amt.cnet> References: <1399297882-3444-1-git-send-email-agraf@suse.de> <5367CE81.6030506@beyond.pl> <5367D7BC.2040705@beyond.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5367D7BC.2040705@beyond.pl> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] kvmclock: Ensure time in migration never goes backward List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcin =?utf-8?Q?Gibu=C5=82a?= Cc: Alexander Graf , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On Mon, May 05, 2014 at 08:26:04PM +0200, Marcin Gibu=C5=82a wrote: > >>is it possible to have kvmclock jumping forward? > >> > >>Because I've reproducible case when at about 1 per 20 vm restores, VM= freezes for couple of hours and then resumes with date few hundreds year= s ahead. Happens only with kvmclock. > >> > >>And this patch seems to fix very similar issue so maybe it's all the = same bug. > > > >I'm fairly sure it is the exact same bug. Jumping backward is like jum= ping forward by a biiiiig amount :) >=20 > Hi, >=20 > I've tested your path on my test VM... don't know if it's pure luck > or not, but it didn't hang with over 70 restores. >=20 > The message "KVM Clock migrated backwards, using later time" fires > every time, but VM is healthy after resume. What is the host clocksource? (cat /sys/devices/system/clocksource/clocksource0/current_clocksource).=20 And kernel version?