From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0sEn-0001NO-TZ for qemu-devel@nongnu.org; Mon, 13 Aug 2012 06:51:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0sEl-0003FO-S7 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 06:51:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0sEl-0003F9-Bo for qemu-devel@nongnu.org; Mon, 13 Aug 2012 06:51:07 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7DAp6gl001485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 06:51:06 -0400 From: Juan Quintela Date: Mon, 13 Aug 2012 12:50:54 +0200 Message-Id: <1344855057-32509-5-git-send-email-quintela@redhat.com> In-Reply-To: <1344855057-32509-1-git-send-email-quintela@redhat.com> References: <1344855057-32509-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 4/7] migration: rename expected_time to expected_downtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, lcapitulino@redhat.com Signed-off-by: Juan Quintela --- arch_init.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9b46bfc..5559d68 100644 --- a/arch_init.c +++ b/arch_init.c @@ -537,7 +537,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque) double bwidth = 0; int ret; int i; - uint64_t expected_time; + uint64_t expected_downtime; bytes_transferred_last = bytes_transferred; bwidth = qemu_get_clock_ns(rt_clock); @@ -576,24 +576,25 @@ static int ram_save_iterate(QEMUFile *f, void *opaque) bwidth = qemu_get_clock_ns(rt_clock) - bwidth; bwidth = (bytes_transferred - bytes_transferred_last) / bwidth; - /* if we haven't transferred anything this round, force expected_time to a - * a very high value, but without crashing */ + /* if we haven't transferred anything this round, force + * expected_downtime to a a very high value, but without + * crashing */ if (bwidth == 0) { bwidth = 0.000001; } qemu_put_be64(f, RAM_SAVE_FLAG_EOS); - expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; + expected_downtime = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; DPRINTF("ram_save_live: expected(" PRIu64 ") <= max(" PRIu64 ")?\n", - expected_time, migrate_max_downtime()); + expected_downtime, migrate_max_downtime()); - if (expected_time <= migrate_max_downtime()) { + if (expected_downtime <= migrate_max_downtime()) { memory_global_sync_dirty_bitmap(get_system_memory()); - expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; + expected_downtime = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; - return expected_time <= migrate_max_downtime(); + return expected_downtime <= migrate_max_downtime(); } return 0; } -- 1.7.11.2