[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/33] migration/postcopy: Recognise the recovery states as 'i
From: |
Alex Bennée |
Subject: |
[PATCH v3 10/33] migration/postcopy: Recognise the recovery states as 'in_postcopy' |
Date: |
Tue, 24 Sep 2019 22:00:43 +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>
Signed-off-by: Alex Bennée <address@hidden>
Message-Id: <address@hidden>
---
migration/migration.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 01863a95f5f..5f7e4d15e95 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.20.1
- [PATCH v3 21/33] tests/tcg: add simple record/replay smoke test for aarch64, (continued)
- [PATCH v3 21/33] tests/tcg: add simple record/replay smoke test for aarch64, Alex Bennée, 2019/09/24
- [PATCH v3 06/33] target/alpha: Mask IOV exception with INV for user-only, Alex Bennée, 2019/09/24
- [PATCH v3 13/33] tests/docker: fix DOCKER_PARTIAL_IMAGES, Alex Bennée, 2019/09/24
- [PATCH v3 04/33] target/alpha: Handle SWCR_MAP_DMZ earlier, Alex Bennée, 2019/09/24
- [PATCH v3 15/33] tests/docker: reduce scary warnings by cleaning up clean up, Alex Bennée, 2019/09/24
- [PATCH v3 08/33] tests/migration: Fail on unexpected migration states, Alex Bennée, 2019/09/24
- [PATCH v3 12/33] tests/docker: add sanitizers back to clang build, Alex Bennée, 2019/09/24
- [PATCH v3 10/33] migration/postcopy: Recognise the recovery states as 'in_postcopy',
Alex Bennée <=
- [PATCH v3 09/33] tests/migration/postcopy: trim migration bandwidth, Alex Bennée, 2019/09/24
- [PATCH v3 27/33] docker: remove debian8-mxe definitions, Alex Bennée, 2019/09/24
- [PATCH v3 17/33] tests/tcg: clean-up some comments after the de-tangling, Alex Bennée, 2019/09/24
- [PATCH v3 18/33] tests/tcg: re-enable linux-test for ppc64abi32, Alex Bennée, 2019/09/24
- [PATCH v3 30/33] docker: remove unused debian-ports, Alex Bennée, 2019/09/24