qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true
@ 2019-07-18  8:37 Wei Yang
  2019-08-05 10:00 ` Dr. David Alan Gilbert
  2019-08-07 17:35 ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yang @ 2019-07-18  8:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Wei Yang, dgilbert, quintela

There is only one place to set start_postcopy to true,
qmp_migrate_start_postcopy(), which make sure start_postcopy could be
set to true when migrate_postcopy() return true.

So start_postcopy is true implies the other one.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 migration/migration.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/migration/migration.c b/migration/migration.c
index 719d125041..27ca10122f 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3101,8 +3101,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
 
     if (pending_size && pending_size >= s->threshold_size) {
         /* Still a significant amount to transfer */
-        if (migrate_postcopy() && !in_postcopy &&
-            pend_pre <= s->threshold_size &&
+        if (!in_postcopy && pend_pre <= s->threshold_size &&
             atomic_read(&s->start_postcopy)) {
             if (postcopy_start(s)) {
                 error_report("%s: postcopy failed to start", __func__);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true
  2019-07-18  8:37 [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true Wei Yang
@ 2019-08-05 10:00 ` Dr. David Alan Gilbert
  2019-08-07 17:35 ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2019-08-05 10:00 UTC (permalink / raw)
  To: Wei Yang; +Cc: qemu-devel, quintela

* Wei Yang (richardw.yang@linux.intel.com) wrote:
> There is only one place to set start_postcopy to true,
> qmp_migrate_start_postcopy(), which make sure start_postcopy could be
> set to true when migrate_postcopy() return true.
> 
> So start_postcopy is true implies the other one.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/migration.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index 719d125041..27ca10122f 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3101,8 +3101,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
>  
>      if (pending_size && pending_size >= s->threshold_size) {
>          /* Still a significant amount to transfer */
> -        if (migrate_postcopy() && !in_postcopy &&
> -            pend_pre <= s->threshold_size &&
> +        if (!in_postcopy && pend_pre <= s->threshold_size &&
>              atomic_read(&s->start_postcopy)) {
>              if (postcopy_start(s)) {
>                  error_report("%s: postcopy failed to start", __func__);
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true
  2019-07-18  8:37 [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true Wei Yang
  2019-08-05 10:00 ` Dr. David Alan Gilbert
@ 2019-08-07 17:35 ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2019-08-07 17:35 UTC (permalink / raw)
  To: Wei Yang; +Cc: qemu-devel, quintela

* Wei Yang (richardw.yang@linux.intel.com) wrote:
> There is only one place to set start_postcopy to true,
> qmp_migrate_start_postcopy(), which make sure start_postcopy could be
> set to true when migrate_postcopy() return true.
> 
> So start_postcopy is true implies the other one.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

Queued

> ---
>  migration/migration.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index 719d125041..27ca10122f 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3101,8 +3101,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
>  
>      if (pending_size && pending_size >= s->threshold_size) {
>          /* Still a significant amount to transfer */
> -        if (migrate_postcopy() && !in_postcopy &&
> -            pend_pre <= s->threshold_size &&
> +        if (!in_postcopy && pend_pre <= s->threshold_size &&
>              atomic_read(&s->start_postcopy)) {
>              if (postcopy_start(s)) {
>                  error_report("%s: postcopy failed to start", __func__);
> -- 
> 2.17.1
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-07 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18  8:37 [Qemu-devel] [PATCH] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true Wei Yang
2019-08-05 10:00 ` Dr. David Alan Gilbert
2019-08-07 17:35 ` 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).