[12/12] migration: report RCU quiescent states

Submitted by Paolo Bonzini on May 15, 2013, 3:48 p.m.

Details

Message ID 1368632937-32272-13-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini May 15, 2013, 3:48 p.m.
The migration thread polls s->state periodically, it does not
use a mutex or condition variable, so it has to report quiescent
states manually.

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

Patch hide | download patch | download mbox

diff --git a/migration.c b/migration.c
index 866d68d..fb8b326 100644
--- a/migration.c
+++ b/migration.c
@@ -22,6 +22,7 @@ 
 #include "qemu/sockets.h"
 #include "migration/block.h"
 #include "qemu/thread.h"
+#include "qemu/rcu.h"
 #include "qmp-commands.h"
 #include "trace.h"
 
@@ -510,6 +511,7 @@  static void *migration_thread(void *opaque)
         int64_t current_time;
         uint64_t pending_size;
 
+        rcu_quiescent_state();
         if (!qemu_file_rate_limit(s->file)) {
             DPRINTF("iterate\n");
             pending_size = qemu_savevm_state_pending(s->file, max_size);