* [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery
@ 2019-09-06 13:01 Peter Xu
2019-09-06 13:35 ` Juan Quintela
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Peter Xu @ 2019-09-06 13:01 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Xiaohui Li, Dr . David Alan Gilbert, peterx,
Juan Quintela
We've got max-postcopy-bandwidth parameter but it's not applied
correctly after a postcopy recovery so the recovered migration stream
will still eat the whole net bandwidth. Fix that up.
Reported-by: Xiaohui Li <xiaohli@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 8b9f2fe30a..b307813aa3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3327,7 +3327,8 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
if (resume) {
/* This is a resumed migration */
- rate_limit = INT64_MAX;
+ rate_limit = s->parameters.max_postcopy_bandwidth /
+ XFER_LIMIT_RATIO;
} else {
/* This is a fresh new migration */
rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery
2019-09-06 13:01 [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery Peter Xu
@ 2019-09-06 13:35 ` Juan Quintela
2019-09-12 10:21 ` Dr. David Alan Gilbert
2019-09-24 18:22 ` Markus Armbruster
2 siblings, 0 replies; 5+ messages in thread
From: Juan Quintela @ 2019-09-06 13:35 UTC (permalink / raw)
To: Peter Xu; +Cc: Laurent Vivier, Xiaohui Li, qemu-devel, Dr . David Alan Gilbert
Peter Xu <peterx@redhat.com> wrote:
> We've got max-postcopy-bandwidth parameter but it's not applied
> correctly after a postcopy recovery so the recovered migration stream
> will still eat the whole net bandwidth. Fix that up.
>
> Reported-by: Xiaohui Li <xiaohli@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> migration/migration.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Juan Quintela <quintela@redhat.com>
> diff --git a/migration/migration.c b/migration/migration.c
> index 8b9f2fe30a..b307813aa3 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3327,7 +3327,8 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
>
> if (resume) {
> /* This is a resumed migration */
> - rate_limit = INT64_MAX;
> + rate_limit = s->parameters.max_postcopy_bandwidth /
> + XFER_LIMIT_RATIO;
> } else {
> /* This is a fresh new migration */
> rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
I was confused thinking that the two assignations were the same O:-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery
2019-09-06 13:01 [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery Peter Xu
2019-09-06 13:35 ` Juan Quintela
@ 2019-09-12 10:21 ` Dr. David Alan Gilbert
2019-09-24 18:22 ` Markus Armbruster
2 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2019-09-12 10:21 UTC (permalink / raw)
To: Peter Xu; +Cc: Laurent Vivier, Xiaohui Li, qemu-devel, Juan Quintela
* Peter Xu (peterx@redhat.com) wrote:
> We've got max-postcopy-bandwidth parameter but it's not applied
> correctly after a postcopy recovery so the recovered migration stream
> will still eat the whole net bandwidth. Fix that up.
>
> Reported-by: Xiaohui Li <xiaohli@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Queued
> ---
> migration/migration.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 8b9f2fe30a..b307813aa3 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3327,7 +3327,8 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
>
> if (resume) {
> /* This is a resumed migration */
> - rate_limit = INT64_MAX;
> + rate_limit = s->parameters.max_postcopy_bandwidth /
> + XFER_LIMIT_RATIO;
> } else {
> /* This is a fresh new migration */
> rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
> --
> 2.21.0
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery
2019-09-06 13:01 [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery Peter Xu
2019-09-06 13:35 ` Juan Quintela
2019-09-12 10:21 ` Dr. David Alan Gilbert
@ 2019-09-24 18:22 ` Markus Armbruster
2019-09-24 18:29 ` Dr. David Alan Gilbert
2 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2019-09-24 18:22 UTC (permalink / raw)
To: Peter Xu
Cc: Laurent Vivier, Xiaohui Li, Juan Quintela, qemu-devel,
Dr . David Alan Gilbert
migration-tests hangs intermittently for me, and git bisect led me
here. Test script:
i=0; while true; do let i++; echo "= $i ="; MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/migration-test -p /x86_64/migration/postcopy/recovery -k; done
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery
2019-09-24 18:22 ` Markus Armbruster
@ 2019-09-24 18:29 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2019-09-24 18:29 UTC (permalink / raw)
To: Markus Armbruster
Cc: Laurent Vivier, Xiaohui Li, qemu-devel, Peter Xu, Juan Quintela
* Markus Armbruster (armbru@redhat.com) wrote:
> migration-tests hangs intermittently for me, and git bisect led me
> here. Test script:
>
> i=0; while true; do let i++; echo "= $i ="; MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/migration-test -p /x86_64/migration/postcopy/recovery -k; done
Which is fixed by the patch I posted yesterday:
migration/postcopy: Recognise the recovery states as 'in_postcopy'
Good working finding it using a bisect - it was way too unreliable
for me to find repeatably.
The 'Fix postcopy bw for recovery' patch is actually right - it just
exposes another existing race.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-24 19:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 13:01 [Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery Peter Xu
2019-09-06 13:35 ` Juan Quintela
2019-09-12 10:21 ` Dr. David Alan Gilbert
2019-09-24 18:22 ` Markus Armbruster
2019-09-24 18:29 ` Dr. David Alan Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).