From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk5qh-0007y0-2t for qemu-devel@nongnu.org; Mon, 20 Apr 2015 03:10:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yk5qc-0004OB-45 for qemu-devel@nongnu.org; Mon, 20 Apr 2015 03:10:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk5qb-0004NO-UQ for qemu-devel@nongnu.org; Mon, 20 Apr 2015 03:10:26 -0400 Date: Mon, 20 Apr 2015 12:40:21 +0530 From: Amit Shah Message-ID: <20150420071021.GB16776@grmbl.mre> References: <1429070355-19862-1-git-send-email-mike@very.puzzling.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429070355-19862-1-git-send-email-mike@very.puzzling.org> Subject: Re: [Qemu-devel] [PATCH] migration: avoid divide by zero in xbzrle cache miss rate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Chapman Cc: qemu-devel@nongnu.org, Juan Quintela On (Wed) 15 Apr 2015 [13:59:14], 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 Reviewed-by: Amit Shah Amit