All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH v16 03/14] migration: Calculate mbps only during transfer time
Date: Wed, 27 Jun 2018 10:28:59 +0100	[thread overview]
Message-ID: <20180627092859.GA2423@work-vm> (raw)
In-Reply-To: <20180626181932.11909-3-quintela@redhat.com>

* Juan Quintela (quintela@redhat.com) wrote:
> We used to include in this calculation the setup time, but that can be
> quite big in rdma or multifd.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/migration.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index e1eaa97df4..d3e6da9bfe 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2708,6 +2708,7 @@ static void migration_calculate_complete(MigrationState *s)
>  {
>      uint64_t bytes = qemu_ftell(s->to_dst_file);
>      int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
> +    int64_t transfer_time;
>  
>      s->total_time = end_time - s->start_time;
>      if (!s->downtime) {
> @@ -2718,8 +2719,9 @@ static void migration_calculate_complete(MigrationState *s)
>          s->downtime = end_time - s->downtime_start;
>      }
>  
> -    if (s->total_time) {
> -        s->mbps = ((double) bytes * 8.0) / s->total_time / 1000;
> +    transfer_time = s->total_time - s->setup_time;
> +    if (transfer_time) {
> +        s->mbps = ((double) bytes * 8.0) / transfer_time / 1000;
>      }
>  }
>  
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2018-06-27  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 18:19 [Qemu-devel] [PATCH v16 01/14] migration: Create multipage support Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 02/14] migration: Create multifd packet Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 03/14] migration: Calculate mbps only during transfer time Juan Quintela
2018-06-27  9:28   ` Dr. David Alan Gilbert [this message]
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 04/14] migration: Abstract the number of bytes sent Juan Quintela
2018-06-27  9:46   ` Dr. David Alan Gilbert
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 05/14] migration: Add multifd traces for start/end thread Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 06/14] migration: Multifd channels always wait on the sem Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 07/14] migration: Add block where to send/receive packets Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 08/14] migration: Synchronize multifd threads with main thread Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 09/14] migration: Create multifd_bytes ram_counter Juan Quintela
2018-06-27 10:01   ` Dr. David Alan Gilbert
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 10/14] migration: Create ram_save_multifd_page Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 11/14] migration: Start sending messages Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 12/14] migration: Wait for blocking IO Juan Quintela
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 13/14] migration: Remove not needed semaphore and quit Juan Quintela
2018-06-27 10:46   ` Dr. David Alan Gilbert
2018-06-26 18:19 ` [Qemu-devel] [PATCH v16 14/14] migration: Stop sending whole pages through main channel Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180627092859.GA2423@work-vm \
    --to=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.