From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF2Cw-0002oT-GD for qemu-devel@nongnu.org; Fri, 21 Sep 2012 08:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF2Cq-0000JW-Je for qemu-devel@nongnu.org; Fri, 21 Sep 2012 08:19:46 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:56310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF2Cq-0000JS-DM for qemu-devel@nongnu.org; Fri, 21 Sep 2012 08:19:40 -0400 Received: by padfb10 with SMTP id fb10so425212pad.4 for ; Fri, 21 Sep 2012 05:19:39 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <505C5B56.9090508@redhat.com> Date: Fri, 21 Sep 2012 14:19:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1348217255-22441-1-git-send-email-quintela@redhat.com> <1348217255-22441-6-git-send-email-quintela@redhat.com> In-Reply-To: <1348217255-22441-6-git-send-email-quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/41] migration: rename expected_time to expected_downtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Il 21/09/2012 10:46, Juan Quintela ha scritto: > Signed-off-by: Juan Quintela > --- > arch_init.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch_init.c b/arch_init.c > index cdd8ab7..013e5e5 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -539,7 +539,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); > @@ -578,24 +578,24 @@ 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 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_downtime, migrate_max_downtime()); > > - DPRINTF("ram_save_live: expected(%" PRIu64 ") <= max(%" PRIu64 ")?\n", > - expected_time, 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; > } > Reviewed-by: Paolo Bonzini