[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 38/45] Don't sync dirty bitmaps in postcopy
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v5 38/45] Don't sync dirty bitmaps in postcopy |
Date: |
Wed, 25 Feb 2015 16:52:01 +0000 |
From: "Dr. David Alan Gilbert" <address@hidden>
Once we're in postcopy the source processors are stopped and memory
shouldn't change any more, so there's no need to look at the dirty
map.
There are two notes to this:
1) If we do resync and a page had changed then the page would get
sent again, which the destination wouldn't allow (since it might
have also modified the page)
2) Before disabling this I'd seen very rare cases where a page had been
marked dirtied although the memory contents are apparently identical
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
arch_init.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index 7a1c9ea..9d8ca95 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -1398,7 +1398,10 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
static int ram_save_complete(QEMUFile *f, void *opaque)
{
qemu_mutex_lock_ramlist();
- migration_bitmap_sync();
+
+ if (!migration_postcopy_phase(migrate_get_current())) {
+ migration_bitmap_sync();
+ }
ram_control_before_iterate(f, RAM_CONTROL_FINISH);
@@ -1433,7 +1436,8 @@ static void ram_save_pending(QEMUFile *f, void *opaque,
uint64_t max_size,
remaining_size = ram_save_remaining() * TARGET_PAGE_SIZE;
- if (remaining_size < max_size) {
+ if (!migration_postcopy_phase(migrate_get_current()) &&
+ remaining_size < max_size) {
qemu_mutex_lock_iothread();
migration_bitmap_sync();
qemu_mutex_unlock_iothread();
--
2.1.0
- [Qemu-devel] [PATCH v5 29/45] postcopy: ram_enable_notify to switch on userfault, (continued)
- [Qemu-devel] [PATCH v5 29/45] postcopy: ram_enable_notify to switch on userfault, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 28/45] postcopy: Incoming initialisation, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 27/45] Postcopy: Maintain sentmap and calculate discard, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 30/45] Postcopy: Postcopy startup in migration thread, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 31/45] Postcopy end in migration_thread, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 32/45] Page request: Add MIG_RP_CMD_REQ_PAGES reverse command, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 33/45] Page request: Process incoming page request, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 34/45] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 35/45] postcopy_ram.c: place_page and helpers, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 36/45] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 38/45] Don't sync dirty bitmaps in postcopy,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v5 39/45] Host page!=target page: Cleanup bitmaps, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 37/45] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 40/45] Postcopy; Handle userfault requests, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 42/45] postcopy: Wire up loadvm_postcopy_handle_{run, end} commands, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 41/45] Start up a postcopy/listener thread ready for incoming page data, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 43/45] End of migration for postcopy, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 45/45] Inhibit ballooning during postcopy, Dr. David Alan Gilbert (git), 2015/02/25
- [Qemu-devel] [PATCH v5 44/45] Disable mlock around incoming postcopy, Dr. David Alan Gilbert (git), 2015/02/25