qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/14] migration queue
@ 2013-01-15 11:18 Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 01/14] Unlock ramlist lock also in error case Juan Quintela
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Hi

This is the intersect of the paolo & me patches for migration thread,
please consided for inclusion.

The following changes since commit cf7c3f0cb5a7129f57fa9e69d410d6a05031988c:

  virtio-9p: fix compilation error. (2013-01-14 18:52:39 -0600)

are available in the git repository at:

  git://repo.or.cz/qemu/quintela.git thread.next

for you to fetch changes up to 869342e49d89763f7590ebc52eaecd9ce9f7baa1:

  Rename buffered_ to migration_ (2013-01-15 12:14:40 +0100)

----------------------------------------------------------------
Juan Quintela (8):
      qemu-file: Only set last_error if it is not already set
      migration: move begining stage to the migration thread
      migration: Add buffered_flush error handling
      migration: move exit condition to migration thread
      migration: unfold rest of migrate_fd_put_ready() into thread
      migration: Only go to the iterate stage if there is anything to send
      migration: remove argument to qemu_savevm_state_cancel
      Rename buffered_ to migration_

Paolo Bonzini (6):
      Unlock ramlist lock also in error case
      Protect migration_bitmap_sync() with the ramlist lock
      use XFER_LIMIT_RATIO consistently
      migration: make function static
      migration: remove double call to migrate_fd_close
      migration: fix off-by-one in buffered_rate_limit

 arch_init.c                   |   6 +-
 include/migration/migration.h |   3 -
 include/sysemu/sysemu.h       |   2 +-
 migration.c                   | 183 ++++++++++++++++++++----------------------
 savevm.c                      |  12 +--
 5 files changed, 98 insertions(+), 108 deletions(-)

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

* [Qemu-devel] [PATCH 01/14] Unlock ramlist lock also in error case
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 02/14] Protect migration_bitmap_sync() with the ramlist lock Juan Quintela
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 arch_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch_init.c b/arch_init.c
index 86f8544..8c833b6 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -642,12 +642,13 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
         i++;
     }

+    qemu_mutex_unlock_ramlist();
+
     if (ret < 0) {
         bytes_transferred += total_sent;
         return ret;
     }

-    qemu_mutex_unlock_ramlist();
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
     total_sent += 8;
     bytes_transferred += total_sent;
-- 
1.8.1

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

* [Qemu-devel] [PATCH 02/14] Protect migration_bitmap_sync() with the ramlist lock
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 01/14] Unlock ramlist lock also in error case Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently Juan Quintela
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 arch_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index 8c833b6..dada6de 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -658,9 +658,8 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)

 static int ram_save_complete(QEMUFile *f, void *opaque)
 {
-    migration_bitmap_sync();
-
     qemu_mutex_lock_ramlist();
+    migration_bitmap_sync();

     /* try transferring iterative blocks of memory */

-- 
1.8.1

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

* [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 01/14] Unlock ramlist lock also in error case Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 02/14] Protect migration_bitmap_sync() with the ramlist lock Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 19:45   ` Eric Blake
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 04/14] migration: make function static Juan Quintela
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

Previous patch missed this case

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index c69e864..d6ec3e8 100644
--- a/migration.c
+++ b/migration.c
@@ -650,7 +650,7 @@ static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate)
         new_rate = SIZE_MAX;
     }

-    s->xfer_limit = new_rate / 10;
+    s->xfer_limit = new_rate / XFER_LIMIT_RATIO;

 out:
     return s->xfer_limit;
-- 
1.8.1

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

* [Qemu-devel] [PATCH 04/14] migration: make function static
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (2 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 05/14] migration: remove double call to migrate_fd_close Juan Quintela
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 include/migration/migration.h | 2 --
 migration.c                   | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/migration/migration.h b/include/migration/migration.h
index 2d5b630..95261c1 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -87,8 +87,6 @@ void migrate_fd_error(MigrationState *s);

 void migrate_fd_connect(MigrationState *s);

-ssize_t migrate_fd_put_buffer(MigrationState *s, const void *data,
-                              size_t size);
 int migrate_fd_close(MigrationState *s);

 void add_migration_state_change_notifier(Notifier *notify);
diff --git a/migration.c b/migration.c
index d6ec3e8..1f4c6ee 100644
--- a/migration.c
+++ b/migration.c
@@ -302,8 +302,8 @@ static void migrate_fd_completed(MigrationState *s)
     notifier_list_notify(&migration_state_notifiers, s);
 }

-ssize_t migrate_fd_put_buffer(MigrationState *s, const void *data,
-                              size_t size)
+static ssize_t migrate_fd_put_buffer(MigrationState *s, const void *data,
+                                     size_t size)
 {
     ssize_t ret;

-- 
1.8.1

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

* [Qemu-devel] [PATCH 05/14] migration: remove double call to migrate_fd_close
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (3 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 04/14] migration: make function static Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 06/14] migration: fix off-by-one in buffered_rate_limit Juan Quintela
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

The call in buffered_close is enough, because buffered_close is called
already by migrate_fd_cleanup.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/migration.c b/migration.c
index 1f4c6ee..5513dde 100644
--- a/migration.c
+++ b/migration.c
@@ -605,7 +605,6 @@ static int buffered_close(void *opaque)
     if (ret >= 0) {
         ret = ret2;
     }
-    ret = migrate_fd_close(s);
     s->complete = true;
     return ret;
 }
-- 
1.8.1

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

* [Qemu-devel] [PATCH 06/14] migration: fix off-by-one in buffered_rate_limit
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (4 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 05/14] migration: remove double call to migrate_fd_close Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 07/14] qemu-file: Only set last_error if it is not already set Juan Quintela
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 5513dde..380f3cb 100644
--- a/migration.c
+++ b/migration.c
@@ -632,7 +632,7 @@ static int buffered_rate_limit(void *opaque)
         return ret;
     }

-    if (s->bytes_xfer > s->xfer_limit) {
+    if (s->bytes_xfer >= s->xfer_limit) {
         return 1;
     }

-- 
1.8.1

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

* [Qemu-devel] [PATCH 07/14] qemu-file: Only set last_error if it is not already set
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (5 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 06/14] migration: fix off-by-one in buffered_rate_limit Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread Juan Quintela
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 savevm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/savevm.c b/savevm.c
index 4e970ca..611e997 100644
--- a/savevm.c
+++ b/savevm.c
@@ -419,7 +419,9 @@ int qemu_file_get_error(QEMUFile *f)

 static void qemu_file_set_error(QEMUFile *f, int ret)
 {
-    f->last_error = ret;
+    if (f->last_error == 0) {
+        f->last_error = ret;
+    }
 }

 /** Flushes QEMUFile buffer
-- 
1.8.1

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

* [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (6 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 07/14] qemu-file: Only set last_error if it is not already set Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 19:47   ` Eric Blake
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 09/14] migration: Add buffered_flush error handling Juan Quintela
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 include/migration/migration.h |  1 -
 migration.c                   | 28 +++++++++++++++-------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/include/migration/migration.h b/include/migration/migration.h
index 95261c1..a8c9639 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -54,7 +54,6 @@ struct MigrationState
     bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
     int64_t xbzrle_cache_size;
     bool complete;
-    bool first_time;
 };

 void process_incoming_migration(QEMUFile *f);
diff --git a/migration.c b/migration.c
index 380f3cb..7ae1d93 100644
--- a/migration.c
+++ b/migration.c
@@ -674,17 +674,6 @@ static bool migrate_fd_put_ready(MigrationState *s, uint64_t max_size)
         qemu_mutex_unlock_iothread();
         return false;
     }
-    if (s->first_time) {
-        s->first_time = false;
-        DPRINTF("beginning savevm\n");
-        ret = qemu_savevm_state_begin(s->file, &s->params);
-        if (ret < 0) {
-            DPRINTF("failed, %d\n", ret);
-            migrate_fd_error(s);
-            qemu_mutex_unlock_iothread();
-            return false;
-        }
-    }

     DPRINTF("iterate\n");
     pending_size = qemu_savevm_state_pending(s->file, max_size);
@@ -733,6 +722,17 @@ static void *buffered_file_thread(void *opaque)
     int64_t initial_time = qemu_get_clock_ms(rt_clock);
     int64_t max_size = 0;
     bool last_round = false;
+    int ret;
+
+    qemu_mutex_lock_iothread();
+    DPRINTF("beginning savevm\n");
+    ret = qemu_savevm_state_begin(s->file, &s->params);
+    if (ret < 0) {
+        DPRINTF("failed, %d\n", ret);
+        qemu_mutex_unlock_iothread();
+        goto out;
+    }
+    qemu_mutex_unlock_iothread();

     while (true) {
         int64_t current_time = qemu_get_clock_ms(rt_clock);
@@ -768,6 +768,10 @@ static void *buffered_file_thread(void *opaque)
         }
     }

+out:
+    if (ret < 0) {
+        migrate_fd_error(s);
+    }
     g_free(s->buffer);
     return NULL;
 }
@@ -789,8 +793,6 @@ void migrate_fd_connect(MigrationState *s)
     s->buffer_size = 0;
     s->buffer_capacity = 0;

-    s->first_time = true;
-
     s->xfer_limit = s->bandwidth_limit / XFER_LIMIT_RATIO;
     s->complete = false;

-- 
1.8.1

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

* [Qemu-devel] [PATCH 09/14] migration: Add buffered_flush error handling
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (7 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 10/14] migration: move exit condition to migration thread Juan Quintela
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Now that we have error handling we can do proper handling of
buffered_flush().

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 7ae1d93..17eb27d 100644
--- a/migration.c
+++ b/migration.c
@@ -757,7 +757,8 @@ static void *buffered_file_thread(void *opaque)
             /* usleep expects microseconds */
             g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);
         }
-        if (buffered_flush(s) < 0) {
+        ret = buffered_flush(s);
+        if (ret < 0) {
             break;
         }

-- 
1.8.1

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

* [Qemu-devel] [PATCH 10/14] migration: move exit condition to migration thread
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (8 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 09/14] migration: Add buffered_flush error handling Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 11/14] migration: unfold rest of migrate_fd_put_ready() into thread Juan Quintela
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/migration.c b/migration.c
index 17eb27d..651edd5 100644
--- a/migration.c
+++ b/migration.c
@@ -669,12 +669,6 @@ static bool migrate_fd_put_ready(MigrationState *s, uint64_t max_size)
     bool last_round = false;

     qemu_mutex_lock_iothread();
-    if (s->state != MIG_STATE_ACTIVE) {
-        DPRINTF("put_ready returning because of non-active state\n");
-        qemu_mutex_unlock_iothread();
-        return false;
-    }
-
     DPRINTF("iterate\n");
     pending_size = qemu_savevm_state_pending(s->file, max_size);
     DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
@@ -737,9 +731,17 @@ static void *buffered_file_thread(void *opaque)
     while (true) {
         int64_t current_time = qemu_get_clock_ms(rt_clock);

+        qemu_mutex_lock_iothread();
+        if (s->state != MIG_STATE_ACTIVE) {
+            DPRINTF("put_ready returning because of non-active state\n");
+            qemu_mutex_unlock_iothread();
+            break;
+        }
         if (s->complete) {
+            qemu_mutex_unlock_iothread();
             break;
         }
+        qemu_mutex_unlock_iothread();
         if (current_time >= initial_time + BUFFER_DELAY) {
             uint64_t transferred_bytes = s->bytes_xfer;
             uint64_t time_spent = current_time - initial_time;
-- 
1.8.1

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

* [Qemu-devel] [PATCH 11/14] migration: unfold rest of migrate_fd_put_ready() into thread
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (9 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 10/14] migration: move exit condition to migration thread Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send Juan Quintela
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

This will allow us finer control in next patches.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 95 ++++++++++++++++++++++++++-----------------------------------
 1 file changed, 41 insertions(+), 54 deletions(-)

diff --git a/migration.c b/migration.c
index 651edd5..6d3aeed 100644
--- a/migration.c
+++ b/migration.c
@@ -662,54 +662,6 @@ static int64_t buffered_get_rate_limit(void *opaque)
     return s->xfer_limit;
 }

-static bool migrate_fd_put_ready(MigrationState *s, uint64_t max_size)
-{
-    int ret;
-    uint64_t pending_size;
-    bool last_round = false;
-
-    qemu_mutex_lock_iothread();
-    DPRINTF("iterate\n");
-    pending_size = qemu_savevm_state_pending(s->file, max_size);
-    DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
-    if (pending_size >= max_size) {
-        ret = qemu_savevm_state_iterate(s->file);
-        if (ret < 0) {
-            migrate_fd_error(s);
-        }
-    } else {
-        int old_vm_running = runstate_is_running();
-        int64_t start_time, end_time;
-
-        DPRINTF("done iterating\n");
-        start_time = qemu_get_clock_ms(rt_clock);
-        qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
-        if (old_vm_running) {
-            vm_stop(RUN_STATE_FINISH_MIGRATE);
-        } else {
-            vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
-        }
-
-        if (qemu_savevm_state_complete(s->file) < 0) {
-            migrate_fd_error(s);
-        } else {
-            migrate_fd_completed(s);
-        }
-        end_time = qemu_get_clock_ms(rt_clock);
-        s->total_time = end_time - s->total_time;
-        s->downtime = end_time - start_time;
-        if (s->state != MIG_STATE_COMPLETED) {
-            if (old_vm_running) {
-                vm_start();
-            }
-        }
-        last_round = true;
-    }
-    qemu_mutex_unlock_iothread();
-
-    return last_round;
-}
-
 static void *buffered_file_thread(void *opaque)
 {
     MigrationState *s = opaque;
@@ -730,6 +682,7 @@ static void *buffered_file_thread(void *opaque)

     while (true) {
         int64_t current_time = qemu_get_clock_ms(rt_clock);
+        uint64_t pending_size;

         qemu_mutex_lock_iothread();
         if (s->state != MIG_STATE_ACTIVE) {
@@ -741,6 +694,46 @@ static void *buffered_file_thread(void *opaque)
             qemu_mutex_unlock_iothread();
             break;
         }
+        if (s->bytes_xfer < s->xfer_limit) {
+            DPRINTF("iterate\n");
+            pending_size = qemu_savevm_state_pending(s->file, max_size);
+            DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
+            if (pending_size >= max_size) {
+                ret = qemu_savevm_state_iterate(s->file);
+                if (ret < 0) {
+                    qemu_mutex_unlock_iothread();
+                    break;
+                }
+            } else {
+                int old_vm_running = runstate_is_running();
+                int64_t start_time, end_time;
+
+                DPRINTF("done iterating\n");
+                start_time = qemu_get_clock_ms(rt_clock);
+                qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+                if (old_vm_running) {
+                    vm_stop(RUN_STATE_FINISH_MIGRATE);
+                } else {
+                    vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
+                }
+                ret = qemu_savevm_state_complete(s->file);
+                if (ret < 0) {
+                    qemu_mutex_unlock_iothread();
+                    break;
+                } else {
+                    migrate_fd_completed(s);
+                }
+                end_time = qemu_get_clock_ms(rt_clock);
+                s->total_time = end_time - s->total_time;
+                s->downtime = end_time - start_time;
+                if (s->state != MIG_STATE_COMPLETED) {
+                    if (old_vm_running) {
+                        vm_start();
+                    }
+                }
+                last_round = true;
+            }
+        }
         qemu_mutex_unlock_iothread();
         if (current_time >= initial_time + BUFFER_DELAY) {
             uint64_t transferred_bytes = s->bytes_xfer;
@@ -763,12 +756,6 @@ static void *buffered_file_thread(void *opaque)
         if (ret < 0) {
             break;
         }
-
-        DPRINTF("file is ready\n");
-        if (s->bytes_xfer < s->xfer_limit) {
-            DPRINTF("notifying client\n");
-            last_round = migrate_fd_put_ready(s, max_size);
-        }
     }

 out:
-- 
1.8.1

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

* [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (10 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 11/14] migration: unfold rest of migrate_fd_put_ready() into thread Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 13/14] migration: remove argument to qemu_savevm_state_cancel Juan Quintela
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Orit Wasserman

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 6d3aeed..fe1a103 100644
--- a/migration.c
+++ b/migration.c
@@ -698,7 +698,7 @@ static void *buffered_file_thread(void *opaque)
             DPRINTF("iterate\n");
             pending_size = qemu_savevm_state_pending(s->file, max_size);
             DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
-            if (pending_size >= max_size) {
+            if (pending_size && pending_size >= max_size) {
                 ret = qemu_savevm_state_iterate(s->file);
                 if (ret < 0) {
                     qemu_mutex_unlock_iothread();
-- 
1.8.1

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

* [Qemu-devel] [PATCH 13/14] migration: remove argument to qemu_savevm_state_cancel
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (11 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_ Juan Quintela
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 include/sysemu/sysemu.h | 2 +-
 migration.c             | 2 +-
 savevm.c                | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index c07d4ee..d65a9f1 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -77,7 +77,7 @@ int qemu_savevm_state_begin(QEMUFile *f,
                             const MigrationParams *params);
 int qemu_savevm_state_iterate(QEMUFile *f);
 int qemu_savevm_state_complete(QEMUFile *f);
-void qemu_savevm_state_cancel(QEMUFile *f);
+void qemu_savevm_state_cancel(void);
 uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size);
 int qemu_loadvm_state(QEMUFile *f);

diff --git a/migration.c b/migration.c
index fe1a103..77c1971 100644
--- a/migration.c
+++ b/migration.c
@@ -330,7 +330,7 @@ static void migrate_fd_cancel(MigrationState *s)

     s->state = MIG_STATE_CANCELLED;
     notifier_list_notify(&migration_state_notifiers, s);
-    qemu_savevm_state_cancel(s->file);
+    qemu_savevm_state_cancel();

     migrate_fd_cleanup(s);
 }
diff --git a/savevm.c b/savevm.c
index 611e997..913a623 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1590,13 +1590,13 @@ int qemu_savevm_state_begin(QEMUFile *f,

         ret = se->ops->save_live_setup(f, se->opaque);
         if (ret < 0) {
-            qemu_savevm_state_cancel(f);
+            qemu_savevm_state_cancel();
             return ret;
         }
     }
     ret = qemu_file_get_error(f);
     if (ret != 0) {
-        qemu_savevm_state_cancel(f);
+        qemu_savevm_state_cancel();
     }

     return ret;
@@ -1647,7 +1647,7 @@ int qemu_savevm_state_iterate(QEMUFile *f)
     }
     ret = qemu_file_get_error(f);
     if (ret != 0) {
-        qemu_savevm_state_cancel(f);
+        qemu_savevm_state_cancel();
     }
     return ret;
 }
@@ -1727,7 +1727,7 @@ uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
     return ret;
 }

-void qemu_savevm_state_cancel(QEMUFile *f)
+void qemu_savevm_state_cancel(void)
 {
     SaveStateEntry *se;

-- 
1.8.1

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

* [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (12 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 13/14] migration: remove argument to qemu_savevm_state_cancel Juan Quintela
@ 2013-01-15 11:18 ` Juan Quintela
  2013-01-15 15:12   ` Paolo Bonzini
  2013-01-15 19:50 ` [Qemu-devel] [PATCH 00/14] migration queue Eric Blake
  2013-01-16 18:14 ` Anthony Liguori
  15 siblings, 1 reply; 23+ messages in thread
From: Juan Quintela @ 2013-01-15 11:18 UTC (permalink / raw)
  To: qemu-devel

This is consistent once that we have moved everything to migration.c

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/migration.c b/migration.c
index 77c1971..ac67525 100644
--- a/migration.c
+++ b/migration.c
@@ -522,7 +522,7 @@ int64_t migrate_xbzrle_cache_size(void)
 /* migration thread support */


-static ssize_t buffered_flush(MigrationState *s)
+static ssize_t migration_flush(MigrationState *s)
 {
     size_t offset = 0;
     ssize_t ret = 0;
@@ -552,7 +552,7 @@ static ssize_t buffered_flush(MigrationState *s)
     return offset;
 }

-static int buffered_put_buffer(void *opaque, const uint8_t *buf,
+static int migration_put_buffer(void *opaque, const uint8_t *buf,
                                int64_t pos, int size)
 {
     MigrationState *s = opaque;
@@ -585,7 +585,7 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf,
     return size;
 }

-static int buffered_close(void *opaque)
+static int migration_close(void *opaque)
 {
     MigrationState *s = opaque;
     ssize_t ret = 0;
@@ -595,7 +595,7 @@ static int buffered_close(void *opaque)

     s->xfer_limit = INT_MAX;
     while (!qemu_file_get_error(s->file) && s->buffer_size) {
-        ret = buffered_flush(s);
+        ret = migration_flush(s);
         if (ret < 0) {
             break;
         }
@@ -609,7 +609,7 @@ static int buffered_close(void *opaque)
     return ret;
 }

-static int buffered_get_fd(void *opaque)
+static int migration_get_fd(void *opaque)
 {
     MigrationState *s = opaque;

@@ -622,7 +622,7 @@ static int buffered_get_fd(void *opaque)
  *   1: Time to stop
  *   negative: There has been an error
  */
-static int buffered_rate_limit(void *opaque)
+static int migration_rate_limit(void *opaque)
 {
     MigrationState *s = opaque;
     int ret;
@@ -639,7 +639,7 @@ static int buffered_rate_limit(void *opaque)
     return 0;
 }

-static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate)
+static int64_t migration_set_rate_limit(void *opaque, int64_t new_rate)
 {
     MigrationState *s = opaque;
     if (qemu_file_get_error(s->file)) {
@@ -655,14 +655,14 @@ out:
     return s->xfer_limit;
 }

-static int64_t buffered_get_rate_limit(void *opaque)
+static int64_t migration_get_rate_limit(void *opaque)
 {
     MigrationState *s = opaque;

     return s->xfer_limit;
 }

-static void *buffered_file_thread(void *opaque)
+static void *migration_file_thread(void *opaque)
 {
     MigrationState *s = opaque;
     int64_t initial_time = qemu_get_clock_ms(rt_clock);
@@ -752,7 +752,7 @@ static void *buffered_file_thread(void *opaque)
             /* usleep expects microseconds */
             g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);
         }
-        ret = buffered_flush(s);
+        ret = migration_flush(s);
         if (ret < 0) {
             break;
         }
@@ -766,13 +766,13 @@ out:
     return NULL;
 }

-static const QEMUFileOps buffered_file_ops = {
-    .get_fd =         buffered_get_fd,
-    .put_buffer =     buffered_put_buffer,
-    .close =          buffered_close,
-    .rate_limit =     buffered_rate_limit,
-    .get_rate_limit = buffered_get_rate_limit,
-    .set_rate_limit = buffered_set_rate_limit,
+static const QEMUFileOps migration_file_ops = {
+    .get_fd =         migration_get_fd,
+    .put_buffer =     migration_put_buffer,
+    .close =          migration_close,
+    .rate_limit =     migration_rate_limit,
+    .get_rate_limit = migration_get_rate_limit,
+    .set_rate_limit = migration_set_rate_limit,
 };

 void migrate_fd_connect(MigrationState *s)
@@ -786,9 +786,9 @@ void migrate_fd_connect(MigrationState *s)
     s->xfer_limit = s->bandwidth_limit / XFER_LIMIT_RATIO;
     s->complete = false;

-    s->file = qemu_fopen_ops(s, &buffered_file_ops);
+    s->file = qemu_fopen_ops(s, &migration_file_ops);

-    qemu_thread_create(&s->thread, buffered_file_thread, s,
+    qemu_thread_create(&s->thread, migration_file_thread, s,
                        QEMU_THREAD_DETACHED);
     notifier_list_notify(&migration_state_notifiers, s);
 }
-- 
1.8.1

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

* Re: [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_ Juan Quintela
@ 2013-01-15 15:12   ` Paolo Bonzini
  0 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2013-01-15 15:12 UTC (permalink / raw)
  To: qemu-devel, Juan Quintela

Il 15/01/2013 12:18, Juan Quintela ha scritto:
> This is consistent once that we have moved everything to migration.c

Please drop this patch, I have the same changes later in my queue and it
causes a lot of conflicts if you put it here.  It's true that the code
is migration.c, but it is still about buffering so I think the renaming
is premature.

Otherwise the series looks good, thanks!

Paolo

> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration.c | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/migration.c b/migration.c
> index 77c1971..ac67525 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -522,7 +522,7 @@ int64_t migrate_xbzrle_cache_size(void)
>  /* migration thread support */
> 
> 
> -static ssize_t buffered_flush(MigrationState *s)
> +static ssize_t migration_flush(MigrationState *s)
>  {
>      size_t offset = 0;
>      ssize_t ret = 0;
> @@ -552,7 +552,7 @@ static ssize_t buffered_flush(MigrationState *s)
>      return offset;
>  }
> 
> -static int buffered_put_buffer(void *opaque, const uint8_t *buf,
> +static int migration_put_buffer(void *opaque, const uint8_t *buf,
>                                 int64_t pos, int size)
>  {
>      MigrationState *s = opaque;
> @@ -585,7 +585,7 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf,
>      return size;
>  }
> 
> -static int buffered_close(void *opaque)
> +static int migration_close(void *opaque)
>  {
>      MigrationState *s = opaque;
>      ssize_t ret = 0;
> @@ -595,7 +595,7 @@ static int buffered_close(void *opaque)
> 
>      s->xfer_limit = INT_MAX;
>      while (!qemu_file_get_error(s->file) && s->buffer_size) {
> -        ret = buffered_flush(s);
> +        ret = migration_flush(s);
>          if (ret < 0) {
>              break;
>          }
> @@ -609,7 +609,7 @@ static int buffered_close(void *opaque)
>      return ret;
>  }
> 
> -static int buffered_get_fd(void *opaque)
> +static int migration_get_fd(void *opaque)
>  {
>      MigrationState *s = opaque;
> 
> @@ -622,7 +622,7 @@ static int buffered_get_fd(void *opaque)
>   *   1: Time to stop
>   *   negative: There has been an error
>   */
> -static int buffered_rate_limit(void *opaque)
> +static int migration_rate_limit(void *opaque)
>  {
>      MigrationState *s = opaque;
>      int ret;
> @@ -639,7 +639,7 @@ static int buffered_rate_limit(void *opaque)
>      return 0;
>  }
> 
> -static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate)
> +static int64_t migration_set_rate_limit(void *opaque, int64_t new_rate)
>  {
>      MigrationState *s = opaque;
>      if (qemu_file_get_error(s->file)) {
> @@ -655,14 +655,14 @@ out:
>      return s->xfer_limit;
>  }
> 
> -static int64_t buffered_get_rate_limit(void *opaque)
> +static int64_t migration_get_rate_limit(void *opaque)
>  {
>      MigrationState *s = opaque;
> 
>      return s->xfer_limit;
>  }
> 
> -static void *buffered_file_thread(void *opaque)
> +static void *migration_file_thread(void *opaque)
>  {
>      MigrationState *s = opaque;
>      int64_t initial_time = qemu_get_clock_ms(rt_clock);
> @@ -752,7 +752,7 @@ static void *buffered_file_thread(void *opaque)
>              /* usleep expects microseconds */
>              g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);
>          }
> -        ret = buffered_flush(s);
> +        ret = migration_flush(s);
>          if (ret < 0) {
>              break;
>          }
> @@ -766,13 +766,13 @@ out:
>      return NULL;
>  }
> 
> -static const QEMUFileOps buffered_file_ops = {
> -    .get_fd =         buffered_get_fd,
> -    .put_buffer =     buffered_put_buffer,
> -    .close =          buffered_close,
> -    .rate_limit =     buffered_rate_limit,
> -    .get_rate_limit = buffered_get_rate_limit,
> -    .set_rate_limit = buffered_set_rate_limit,
> +static const QEMUFileOps migration_file_ops = {
> +    .get_fd =         migration_get_fd,
> +    .put_buffer =     migration_put_buffer,
> +    .close =          migration_close,
> +    .rate_limit =     migration_rate_limit,
> +    .get_rate_limit = migration_get_rate_limit,
> +    .set_rate_limit = migration_set_rate_limit,
>  };
> 
>  void migrate_fd_connect(MigrationState *s)
> @@ -786,9 +786,9 @@ void migrate_fd_connect(MigrationState *s)
>      s->xfer_limit = s->bandwidth_limit / XFER_LIMIT_RATIO;
>      s->complete = false;
> 
> -    s->file = qemu_fopen_ops(s, &buffered_file_ops);
> +    s->file = qemu_fopen_ops(s, &migration_file_ops);
> 
> -    qemu_thread_create(&s->thread, buffered_file_thread, s,
> +    qemu_thread_create(&s->thread, migration_file_thread, s,
>                         QEMU_THREAD_DETACHED);
>      notifier_list_notify(&migration_state_notifiers, s);
>  }
> 

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

* Re: [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently Juan Quintela
@ 2013-01-15 19:45   ` Eric Blake
  0 siblings, 0 replies; 23+ messages in thread
From: Eric Blake @ 2013-01-15 19:45 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

On 01/15/2013 04:18 AM, Juan Quintela wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> Previous patch missed this case

Might be worth mentioning _which_ previous patch, now that there is
quite a gap in the git history.

> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration.c b/migration.c
> index c69e864..d6ec3e8 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -650,7 +650,7 @@ static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate)
>          new_rate = SIZE_MAX;
>      }
> 
> -    s->xfer_limit = new_rate / 10;
> +    s->xfer_limit = new_rate / XFER_LIMIT_RATIO;
> 
>  out:
>      return s->xfer_limit;
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

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

* Re: [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread Juan Quintela
@ 2013-01-15 19:47   ` Eric Blake
  0 siblings, 0 replies; 23+ messages in thread
From: Eric Blake @ 2013-01-15 19:47 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On 01/15/2013 04:18 AM, Juan Quintela wrote:

In the subject line: s/begining/beginning/

> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  include/migration/migration.h |  1 -
>  migration.c                   | 28 +++++++++++++++-------------
>  2 files changed, 15 insertions(+), 14 deletions(-)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

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

* Re: [Qemu-devel] [PATCH 00/14] migration queue
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (13 preceding siblings ...)
  2013-01-15 11:18 ` [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_ Juan Quintela
@ 2013-01-15 19:50 ` Eric Blake
  2013-01-16 18:14 ` Anthony Liguori
  15 siblings, 0 replies; 23+ messages in thread
From: Eric Blake @ 2013-01-15 19:50 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On 01/15/2013 04:18 AM, Juan Quintela wrote:
> Hi
> 
> This is the intersect of the paolo & me patches for migration thread,
> please consided for inclusion.
> 

> 
>  arch_init.c                   |   6 +-
>  include/migration/migration.h |   3 -
>  include/sysemu/sysemu.h       |   2 +-
>  migration.c                   | 183 ++++++++++++++++++++----------------------
>  savevm.c                      |  12 +--
>  5 files changed, 98 insertions(+), 108 deletions(-)

I found some commit message improvements in 3 and 8, but as that does
not affect the code...

Series: Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

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

* Re: [Qemu-devel] [PATCH 00/14] migration queue
  2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
                   ` (14 preceding siblings ...)
  2013-01-15 19:50 ` [Qemu-devel] [PATCH 00/14] migration queue Eric Blake
@ 2013-01-16 18:14 ` Anthony Liguori
  2013-01-17 10:50   ` Paolo Bonzini
  15 siblings, 1 reply; 23+ messages in thread
From: Anthony Liguori @ 2013-01-16 18:14 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel

Juan Quintela <quintela@redhat.com> writes:

> Hi
>
> This is the intersect of the paolo & me patches for migration thread,
> please consided for inclusion.
>
> The following changes since commit cf7c3f0cb5a7129f57fa9e69d410d6a05031988c:
>
>   virtio-9p: fix compilation error. (2013-01-14 18:52:39 -0600)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/quintela.git thread.next
>
> for you to fetch changes up to 869342e49d89763f7590ebc52eaecd9ce9f7baa1:
>
>   Rename buffered_ to migration_ (2013-01-15 12:14:40 +0100)

If this a PULL request, you should put 'PULL' in the subject.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> Juan Quintela (8):
>       qemu-file: Only set last_error if it is not already set
>       migration: move begining stage to the migration thread
>       migration: Add buffered_flush error handling
>       migration: move exit condition to migration thread
>       migration: unfold rest of migrate_fd_put_ready() into thread
>       migration: Only go to the iterate stage if there is anything to send
>       migration: remove argument to qemu_savevm_state_cancel
>       Rename buffered_ to migration_
>
> Paolo Bonzini (6):
>       Unlock ramlist lock also in error case
>       Protect migration_bitmap_sync() with the ramlist lock
>       use XFER_LIMIT_RATIO consistently
>       migration: make function static
>       migration: remove double call to migrate_fd_close
>       migration: fix off-by-one in buffered_rate_limit
>
>  arch_init.c                   |   6 +-
>  include/migration/migration.h |   3 -
>  include/sysemu/sysemu.h       |   2 +-
>  migration.c                   | 183 ++++++++++++++++++++----------------------
>  savevm.c                      |  12 +--
>  5 files changed, 98 insertions(+), 108 deletions(-)

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

* Re: [Qemu-devel] [PATCH 00/14] migration queue
  2013-01-16 18:14 ` Anthony Liguori
@ 2013-01-17 10:50   ` Paolo Bonzini
  2013-01-17 12:46     ` Juan Quintela
  0 siblings, 1 reply; 23+ messages in thread
From: Paolo Bonzini @ 2013-01-17 10:50 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Juan Quintela

Il 16/01/2013 19:14, Anthony Liguori ha scritto:
> Juan Quintela <quintela@redhat.com> writes:
> 
>> Hi
>>
>> This is the intersect of the paolo & me patches for migration thread,
>> please consided for inclusion.
>>
>> The following changes since commit cf7c3f0cb5a7129f57fa9e69d410d6a05031988c:
>>
>>   virtio-9p: fix compilation error. (2013-01-14 18:52:39 -0600)
>>
>> are available in the git repository at:
>>
>>   git://repo.or.cz/qemu/quintela.git thread.next
>>
>> for you to fetch changes up to 869342e49d89763f7590ebc52eaecd9ce9f7baa1:
>>
>>   Rename buffered_ to migration_ (2013-01-15 12:14:40 +0100)
> 
> If this a PULL request, you should put 'PULL' in the subject.

It shouldn't be, because the patches have never been posted before.
That said, I'm okay with pulling all patches except the last one.

Paolo

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

* Re: [Qemu-devel] [PATCH 00/14] migration queue
  2013-01-17 10:50   ` Paolo Bonzini
@ 2013-01-17 12:46     ` Juan Quintela
  2013-01-17 13:00       ` Paolo Bonzini
  0 siblings, 1 reply; 23+ messages in thread
From: Juan Quintela @ 2013-01-17 12:46 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Anthony Liguori

Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 16/01/2013 19:14, Anthony Liguori ha scritto:
>> Juan Quintela <quintela@redhat.com> writes:
>> 
>>> Hi
>>>
>>> This is the intersect of the paolo & me patches for migration thread,
>>> please consided for inclusion.
>>>
>>> The following changes since commit cf7c3f0cb5a7129f57fa9e69d410d6a05031988c:
>>>
>>>   virtio-9p: fix compilation error. (2013-01-14 18:52:39 -0600)
>>>
>>> are available in the git repository at:
>>>
>>>   git://repo.or.cz/qemu/quintela.git thread.next
>>>
>>> for you to fetch changes up to 869342e49d89763f7590ebc52eaecd9ce9f7baa1:
>>>
>>>   Rename buffered_ to migration_ (2013-01-15 12:14:40 +0100)
>> 
>> If this a PULL request, you should put 'PULL' in the subject.
>
> It shouldn't be, because the patches have never been posted before.
> That said, I'm okay with pulling all patches except the last one.

I will add that as reviewed by? O:-)

Sending all less the last one with proper PULL request.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH 00/14] migration queue
  2013-01-17 12:46     ` Juan Quintela
@ 2013-01-17 13:00       ` Paolo Bonzini
  0 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2013-01-17 13:00 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, Anthony Liguori

Il 17/01/2013 13:46, Juan Quintela ha scritto:
>> >
>> > It shouldn't be, because the patches have never been posted before.
>> > That said, I'm okay with pulling all patches except the last one.
> I will add that as reviewed by? O:-)

Yes.

Paolo

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

end of thread, other threads:[~2013-01-17 13:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 11:18 [Qemu-devel] [PATCH 00/14] migration queue Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 01/14] Unlock ramlist lock also in error case Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 02/14] Protect migration_bitmap_sync() with the ramlist lock Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 03/14] use XFER_LIMIT_RATIO consistently Juan Quintela
2013-01-15 19:45   ` Eric Blake
2013-01-15 11:18 ` [Qemu-devel] [PATCH 04/14] migration: make function static Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 05/14] migration: remove double call to migrate_fd_close Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 06/14] migration: fix off-by-one in buffered_rate_limit Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 07/14] qemu-file: Only set last_error if it is not already set Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 08/14] migration: move begining stage to the migration thread Juan Quintela
2013-01-15 19:47   ` Eric Blake
2013-01-15 11:18 ` [Qemu-devel] [PATCH 09/14] migration: Add buffered_flush error handling Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 10/14] migration: move exit condition to migration thread Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 11/14] migration: unfold rest of migrate_fd_put_ready() into thread Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 12/14] migration: Only go to the iterate stage if there is anything to send Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 13/14] migration: remove argument to qemu_savevm_state_cancel Juan Quintela
2013-01-15 11:18 ` [Qemu-devel] [PATCH 14/14] Rename buffered_ to migration_ Juan Quintela
2013-01-15 15:12   ` Paolo Bonzini
2013-01-15 19:50 ` [Qemu-devel] [PATCH 00/14] migration queue Eric Blake
2013-01-16 18:14 ` Anthony Liguori
2013-01-17 10:50   ` Paolo Bonzini
2013-01-17 12:46     ` Juan Quintela
2013-01-17 13:00       ` Paolo Bonzini

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).