提交 5b648de0 编写于 作者: W Wei Yang 提交者: Michael Tokarev

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: NWei Yang <richard.weiyang@gmail.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 58c652c0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册