migration/postcopy: Recognise the recovery states as 'in_postcopy'
PATCH 1/1 migration/postcopy: Recognise the recovery states as 'in_postcopy'
From: "Dr. David Alan Gilbert" <[email protected]>
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.
--- migration/migration.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
migration/migration.c +8 -1
@@ -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)
Signature · 1 line
2.21.0
Quoted 7 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
I'm stress testing it now.
Quoted 14 lines
--- migration/migration.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)migration/migration.c +1
-1@@ -1659,7 +1659,14 @@ bool migration_in_postcopy(void) {MigrationState *s =migrate_get_current (); -return (s->state ==MIGRATION_STATUS_POSTCOPY_ACTIVE ); +switch (s->state) {
migration/migration.c bool migration_in_postcopy(void) · line 1672
Quoted 10 lines
migration/migration.c +7
-0+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)
--
Alex Bennée
Quoted 7 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
Yeh this makes quite a lot of sense to me...
Signature · 1 line
Peter Xu
Quoted 7 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
Quoted 7 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
In my xenial stress test I run 100 times and it never triggered the 180s timeout I set on my retry.py script:
Quoted 14 lines
--- migration/migration.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)migration/migration.c +1
-1@@ -1659,7 +1659,14 @@ bool migration_in_postcopy(void) {MigrationState *s =migrate_get_current (); -return (s->state ==MIGRATION_STATUS_POSTCOPY_ACTIVE ); +switch (s->state) {
migration/migration.c bool migration_in_postcopy(void) · line 1672
Quoted 10 lines
migration/migration.c +7
-0+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)
--
Alex Bennée
Quoted 7 lines · Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
This seems to fix the intermittent hangs I observed and bisected to commit 8504ddeca0 "migration: Fix postcopy bw for recovery".
Quoted 7 lines · * Dr. David Alan Gilbert (git) ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
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'.
Quoted 8 lines
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 <[email protected]>
Queued
Quoted 28 lines
--- migration/migration.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)migration/migration.c +8
-1@@ -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)Signature · 1 line
2.21.0
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK