migration: Fix calculation of bytes_transferred
authorPierre Riteau <Pierre.Riteau@irisa.fr>
Wed, 12 May 2010 13:12:44 +0000 (15:12 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 1 Jun 2010 17:53:09 +0000 (12:53 -0500)
commitce1c4d17223e2b54b8e9638dd4daf986ac5a624e
treeb5d4474edb117b2cf5a0834869c5cb292fcbdef5
parent161c90057562b8842093046317b155f96e4b98b0
migration: Fix calculation of bytes_transferred

When a page with all identical bytes is transferred, it is counted
as a full page (TARGET_PAGE_SIZE) although only one byte is actually
sent. Fix this by changing ram_save_block() to return the number of
bytes sent instead of a boolean value. This makes bandwidth
estimation, and consequently downtime estimation, more precise.

Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
arch_init.c