Received: from eggs.gnu.org ([2001:4830:134:3::10]:43607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq1MG-0003cS-QX for qemu-devel@nongnu.org; Wed, 06 May 2015 11:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq1MD-000391-CJ for qemu-devel@nongnu.org; Wed, 06 May 2015 11:35:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq1MD-00038a-6x for qemu-devel@nongnu.org; Wed, 06 May 2015 11:35:33 -0400 From: Juan Quintela In-Reply-To: <1429070355-19862-1-git-send-email-mike@very.puzzling.org> (Michael Chapman's message of "Wed, 15 Apr 2015 13:59:14 +1000") References: <1429070355-19862-1-git-send-email-mike@very.puzzling.org> Date: Wed, 06 May 2015 17:35:30 +0200 Message-ID: <87oalx1zy5.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] migration: avoid divide by zero in xbzrle cache miss rate Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Chapman Cc: Amit Shah , qemu-devel@nongnu.org Michael Chapman wrote: > This bug manifested itself as a VM that could not be resumed by libvirt > following a migration: > > # virsh resume example > error: Failed to resume domain example > error: internal error: cannot parse json {"return": > {"xbzrle-cache": > {..., "cache-miss-rate": -nan, ...}, > ... > } > }: lexical error: malformed number, a digit is required after the minus sign. > > This patch also ensures xbzrle_cache_miss_prev and iterations_prev are > cleared at the start of the migration. > > Signed-off-by: Michael Chapman Applied, thanks.