[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 45/46] End of migration for postcopy
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH 45/46] End of migration for postcopy |
Date: |
Fri, 4 Jul 2014 18:41:56 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
Tweak the end of migration cleanup; we don't want to close stuff down
at the end of the main stream, since the postcopy is still sending pages
on the other thread.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/migration.c b/migration.c
index fc8911d..5a85d03 100644
--- a/migration.c
+++ b/migration.c
@@ -190,6 +190,26 @@ static void process_incoming_migration_co(void *opaque)
ret = qemu_loadvm_state(f);
+ if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) {
+ /*
+ * Where a migration had postcopy enabled (and thus went to advise)
+ * but managed to complete within the precopy period
+ */
+ postcopy_ram_incoming_cleanup(mis);
+ }
+
+ DPRINTF("%s: ret=%d postcopy_ram_state=%d", __func__, ret,
+ mis->postcopy_ram_state);
+ if ((ret >= 0) &&
+ (mis->postcopy_ram_state > POSTCOPY_RAM_INCOMING_ADVISE)) {
+ /*
+ * Postcopy was started, cleanup should happen at the end of the
+ * postcopy thread.
+ */
+ DPRINTF("process_incoming_migration_co: exiting main branch");
+ return;
+ }
+
f->mis = NULL;
qemu_fclose(f);
free_xbzrle_decoded_buf();
--
1.9.3
- Re: [Qemu-devel] [PATCH 31/46] Postcopy: Rework migration thread for postcopy mode, (continued)
- [Qemu-devel] [PATCH 33/46] Postcopy: Create a fault handler thread before marking the ram as userfault, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 34/46] Page request: Add MIG_RPCOMM_REQPAGES reverse command, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 36/46] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 37/46] Add assertion to check migration_dirty_pages doesn't go -ve; have seen it happen once but not sure why, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 35/46] Page request: Process incoming page request, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 38/46] postcopy_ram.c: place_page and helpers, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 39/46] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 43/46] postcopy: Wire up loadvm_postcopy_ram_handle_{run, end} commands, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 44/46] postcopy: Use userfaultfd, Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 45/46] End of migration for postcopy,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH 46/46] Start documenting how postcopy works., Dr. David Alan Gilbert (git), 2014/07/04
- [Qemu-devel] [PATCH 16/46] Add migration-capability boolean for postcopy-ram., Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 17/46] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages., Dr. David Alan Gilbert (git), 2014/07/04
[Qemu-devel] [PATCH 15/46] Rework loadvm path for subloops, Dr. David Alan Gilbert (git), 2014/07/04