[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 9/9] migration/postcopy: Recognise the recovery states as 'in_post
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 9/9] migration/postcopy: Recognise the recovery states as 'in_postcopy' |
Date: |
Wed, 25 Sep 2019 16:01:30 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Various parts of the migration code do different things when they're
in postcopy mode; prior to this patch this has been 'postcopy-active'.
This patch extends 'in_postcopy' to include 'postcopy-paused' and
'postcopy-recover'.
In particular, when you set the max-postcopy-bandwidth parameter, this
only affects the current migration fd if we're 'in_postcopy';
this leads to a race in the postcopy recovery test where it increases
the speed from 4k/sec to unlimited, but that increase can get ignored
if the change is made between the point at which the reconnection
happens and it transitions back to active.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Tested-by: Markus Armbruster <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/migration.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 01863a95f5..5f7e4d15e9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1659,7 +1659,14 @@ bool migration_in_postcopy(void)
{
MigrationState *s = migrate_get_current();
- return (s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
+ switch (s->state) {
+ case MIGRATION_STATUS_POSTCOPY_ACTIVE:
+ case MIGRATION_STATUS_POSTCOPY_PAUSED:
+ case MIGRATION_STATUS_POSTCOPY_RECOVER:
+ return true;
+ default:
+ return false;
+ }
}
bool migration_in_postcopy_after_devices(MigrationState *s)
--
2.21.0
- [PULL 0/9] migration queue, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 1/9] migration: fix vmdesc leak on vmstate_save() error, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 2/9] migration/postcopy: not necessary to do discard when canonicalizing bitmap, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 3/9] migration/postcopy: unsentmap is not necessary for postcopy, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 4/9] migration: remove sent parameter in get_queued_page_not_dirty, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 5/9] migration/rdma: Don't moan about disconnects at the end, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 6/9] migration/rdma.c: Swap synchronize_rcu for call_rcu, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 7/9] tests/migration: Fail on unexpected migration states, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 8/9] tests/migration/postcopy: trim migration bandwidth, Dr. David Alan Gilbert (git), 2019/09/25
- [PULL 9/9] migration/postcopy: Recognise the recovery states as 'in_postcopy',
Dr. David Alan Gilbert (git) <=
- Re: [PULL 0/9] migration queue, Peter Maydell, 2019/09/26