[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 42/43] End of migration for postcopy
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v2 42/43] End of migration for postcopy |
Date: |
Mon, 11 Aug 2014 15:29:58 +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 ac5bd3d..188b13b 100644
--- a/migration.c
+++ b/migration.c
@@ -212,6 +212,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;
+ }
+
qemu_fclose(f);
free_xbzrle_decoded_buf();
migration_incoming_state_destroy();
--
1.9.3
- [Qemu-devel] [PATCH v2 31/43] Postcopy: Create a fault handler thread before marking the ram as userfault, (continued)
- [Qemu-devel] [PATCH v2 31/43] Postcopy: Create a fault handler thread before marking the ram as userfault, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 33/43] Page request: Process incoming page request, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 34/43] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 36/43] postcopy_ram.c: place_page and helpers, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 35/43] Add assertion to check migration_dirty_pages, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 38/43] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 37/43] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 40/43] Start up a postcopy/listener thread ready for incoming page data, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 41/43] postcopy: Wire up loadvm_postcopy_ram_handle_{run, end} commands, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 39/43] Postcopy; Handle userfault requests, Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 42/43] End of migration for postcopy,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v2 43/43] Start documenting how postcopy works., Dr. David Alan Gilbert (git), 2014/08/11
- [Qemu-devel] [PATCH v2 32/43] Page request: Add MIG_RPCOMM_REQPAGES reverse command, Dr. David Alan Gilbert (git), 2014/08/11
- Re: [Qemu-devel] [PATCH v2 00/43] Postcopy implementation, zhanghailiang, 2014/08/11