diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2016-01-24 14:09:57 +0000 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:43:57 -0600 |
commit | cf3d290e005a56b3bc4b397d7b5207cbfb7ebc94 (patch) | |
tree | c986dca814765faf89b35c5114169f7904829a65 | |
parent | 2a1c5155bac7e32667b51cfc823ac9e818d5056f (diff) | |
download | hqemu-cf3d290e005a56b3bc4b397d7b5207cbfb7ebc94.zip hqemu-cf3d290e005a56b3bc4b397d7b5207cbfb7ebc94.tar.gz |
rdma: remove check on time_spent when calculating mbs
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>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | migration/migration.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c index 82604d2..a64cfcd 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1691,8 +1691,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); |