rdma: remove check on time_spent when calculating mbs
PATCH 1/2 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.
--- migration/migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
migration/migration.c +2 -2
@@ -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);
Signature · 1 line
2.5.0
PATCH 2/2 qmp-spec: fix index in doc
The index is duplicated. Just change it.
--- docs/qmp-spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/qmp-spec.txt +1 -1
@@ -180,7 +180,7 @@ Some events are rate-limited to at most one per second. If additional dropped, and the last one is delayed. "Similar" normally means same event type. See qmp-events.txt for details. -2.5 QGA Synchronization +2.6 QGA Synchronization ----------------------- When using QGA, an additional synchronization feature is built into
Signature · 1 line
2.5.0
Someone like these two patches? :)
Quoted 26 lines · Wei Yang
Within the if statement,
time_spentis assured to be non-zero.This patch just removes the check on
time_spentwhen calculating mbs.Signed-off-by Wei Yang <[email protected]>---
migration/migration.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)migration/migration.c +2
-2@@ -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);Signature · 1 line
2.5.0
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 1 line · Wei Yang
Someone like these two patches? :)
Could you please post these to qemu-devel as well?
Thanks,
Amit
Quoted 3 lines · Wei Yang
Within the if statement,
time_spentis assured to be non-zero.This patch just removes the check on
time_spentwhen calculating mbs.
The if statement is this one:
if (current_time >= initial_time + BUFFER_DELAY) {Note that we use time_spent as a divisor to calculate bandwidth too.
This is indeed a trivial patch, I'm applying it to -trivial, but please the next time post it to qemu-devel (the main mailinglist), and Cc qemu-trivial if it is trivial.
Thanks!
/mjt
Quoted 21 lines
Signed-off-by Wei Yang <[email protected]>--- migration/migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)migration/migration.c +2
-2@@ -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);
Re: [Qemu-devel] [PATCH 2/2] qmp-spec: fix index in doc
In reply to Wei YangQuoted 1 line · Wei Yang
The index is duplicated. Just change it.
It is indeed, with previous being 2.5 as well
and the next being 3. Applying to -trivial.
Please the next time send to qemu-devel@ and Cc to -trivial.
Thanks!
/mjt
Quoted 19 lines
Signed-off-by Wei Yang <[email protected]>--- docs/qmp-spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docs/qmp-spec.txt +1
-1@@ -180,7 +180,7 @@ Some events are rate-limited to at most one per second. If additional dropped, and the last one is delayed. "Similar" normally means same event type. See qmp-events.txt for details. -2.5 QGA Synchronization +2.6 QGA Synchronization ----------------------- When using QGA, an additional synchronization feature is built into
Re: [Qemu-devel] [PATCH 2/2] qmp-spec: fix index in doc
Quoted 8 lines · Michael Tokarev
Quoted 1 line · Wei Yang
The index is duplicated. Just change it.
It is indeed, with previous being 2.5 as well
and the next being 3. Applying to -trivial.Please the next time send to qemu-devel@ and Cc to -trivial.
Thanks, got the correct procedure.
Quoted 23 lines
Thanks!
/mjt
Quoted 19 lines
Signed-off-by Wei Yang <[email protected]>--- docs/qmp-spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docs/qmp-spec.txt +1
-1@@ -180,7 +180,7 @@ Some events are rate-limited to at most one per second. If additional dropped, and the last one is delayed. "Similar" normally means same event type. See qmp-events.txt for details. -2.5 QGA Synchronization +2.6 QGA Synchronization ----------------------- When using QGA, an additional synchronization feature is built into
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 7 lines · Michael Tokarev
Quoted 3 lines · Wei Yang
Within the if statement,
time_spentis assured to be non-zero.This patch just removes the check on
time_spentwhen calculating mbs.The if statement is this one:
Quoted 9 lines
if (current_time >= initial_time + BUFFER_DELAY) {Note that we use
time_spentas a divisor to calculate bandwidth too.This is indeed a trivial patch, I'm applying it to -trivial, but please the next time post it to qemu-devel (the main mailinglist), and Cc qemu-trivial if it is trivial.
To Amit and Michael,
Yep, thanks. I thought these two are too trivial to post to qemu-devel :)
Will do this next time.
Quoted 25 lines
Thanks!
/mjt
Quoted 21 lines
Signed-off-by Wei Yang <[email protected]>--- migration/migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)migration/migration.c +2
-2@@ -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);
Signature · 2 lines
Wei Yang Help you, Help me