All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: qemu-trivial@nongnu.org, amit.shah@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-trivial] [PATCH 1/2] rdma: remove check on time_spent when calculating mbs
Date: Fri, 29 Jan 2016 14:03:26 +0000	[thread overview]
Message-ID: <20160129140326.GA4544@vultr.guest> (raw)
In-Reply-To: <1453644598-11250-1-git-send-email-richard.weiyang@gmail.com>

Someone like these two patches? :)

On Sun, Jan 24, 2016 at 02:09:57PM +0000, Wei Yang wrote:
>Within the if statement, time_spent is assured to be non-zero.
>
>This patch just removes the check on time_spent when calculating mbs.
>
>Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>---
> migration/migration.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/migration/migration.c b/migration/migration.c
>index c842499..40b87f2 100644
>--- a/migration/migration.c
>+++ b/migration/migration.c
>@@ -1677,8 +1677,8 @@ static void *migration_thread(void *opaque)
>             double bandwidth = (double)transferred_bytes / time_spent;
>             max_size = bandwidth * migrate_max_downtime() / 1000000;
> 
>-            s->mbps = time_spent ? (((double) transferred_bytes * 8.0) /
>-                    ((double) time_spent / 1000.0)) / 1000.0 / 1000.0 : -1;
>+            s->mbps = (((double) transferred_bytes * 8.0) /
>+                    ((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
> 
>             trace_migrate_transferred(transferred_bytes, time_spent,
>                                       bandwidth, max_size);
>-- 
>2.5.0

-- 
Wei Yang
Help you, Help me


  parent reply	other threads:[~2016-01-29 14:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 14:09 [Qemu-trivial] [PATCH 1/2] rdma: remove check on time_spent when calculating mbs Wei Yang
2016-01-24 14:09 ` [Qemu-trivial] [PATCH 2/2] qmp-spec: fix index in doc Wei Yang
2016-01-30  9:46   ` Michael Tokarev
2016-01-30  9:46     ` [Qemu-devel] " Michael Tokarev
2016-02-01 12:52     ` [Qemu-trivial] " Wei Yang
2016-02-01 12:52       ` [Qemu-devel] " Wei Yang
2016-01-29 14:03 ` Wei Yang [this message]
2016-01-29 14:37   ` [Qemu-trivial] [PATCH 1/2] rdma: remove check on time_spent when calculating mbs Amit Shah
2016-01-30  9:45 ` Michael Tokarev
2016-01-30  9:45   ` [Qemu-devel] " Michael Tokarev
2016-02-01 12:54   ` [Qemu-trivial] " Wei Yang
2016-02-01 12:54     ` [Qemu-devel] " Wei Yang

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=20160129140326.GA4544@vultr.guest \
    --to=richard.weiyang@gmail.com \
    --cc=amit.shah@redhat.com \
    --cc=qemu-trivial@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.