From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC9Sv-0002uX-3C for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:28:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC9So-00040X-WD for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:28:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC9So-00040M-Mv for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:28:14 -0400 Date: Thu, 13 Sep 2012 14:28:04 +0100 From: "Daniel P. Berrange" Message-ID: <20120913132804.GO7767@redhat.com> References: <87pq5r5otp.fsf@codemonkey.ws> <20120912151549.GT20907@redhat.com> <87y5kfrtne.fsf@codemonkey.ws> <20120913104940.GA20907@redhat.com> <5051DC20.4090204@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5051DC20.4090204@redhat.com> Subject: Re: [Qemu-devel] Rethinking missed tick catchup Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , Gleb Natapov , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity , Anthony Liguori , Paolo Bonzini On Thu, Sep 13, 2012 at 07:14:08AM -0600, Eric Blake wrote: > On 09/13/2012 04:49 AM, Gleb Natapov wrote: > >> They do if you hibernate your laptop. > >> > > AFAIK libvirt migrates vm into a file on hibernate. It is better to move to S3 > > (using qemu-ga) instead and migrate to file only if s3 fails. > > On host hibernate, libvirt currently does nothing to the guest. When > the host resumes, the guests see a large gap in execution. > > Libvirt would need a hook into host hibernation, to have enough time to > tell the guests to go into S3 prior to allowing the host to go into S3. > > On host reboot, libvirt currently saves guests to disk using migrate to > file. The ideal solution would be to first tell the guest to go into S3 > before migrating to file, but the migration to file STILL must occur, > because the host is about to reboot and S3 is not persistent. S3 is a > better solution than S4, in that S4 requires the guest to have enough > memory (and if it doesn't cooperate, data is lost), but with S3, even if > the guest doesn't cooperate, we can still fall back to migration to file > with the guest only losing time, but not data. Trying to hook into host S3/S4 and do magic to the guests is just asking for trouble. Not only can it arbitrarily delay the host going into S3/S4, but it is not reliable in general, even for OS which do support it. Much better off hooking into the resume path on the host and issuing a QEMU GA call to each running guest to resync their clocks Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|