[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy |
Date: |
Tue, 16 Jun 2015 11:26:48 +0100 |
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>
Reviewed-by: David Gibson <address@hidden>
---
migration/ram.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 01a0ab4..5cff4d6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1643,7 +1643,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
{
rcu_read_lock();
- migration_bitmap_sync();
+ if (!migration_postcopy_phase(migrate_get_current())) {
+ migration_bitmap_sync();
+ }
ram_control_before_iterate(f, RAM_CONTROL_FINISH);
@@ -1678,7 +1680,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();
rcu_read_lock();
migration_bitmap_sync();
--
2.4.3
- [Qemu-devel] [PATCH v7 26/42] postcopy: Incoming initialisation, (continued)
- [Qemu-devel] [PATCH v7 26/42] postcopy: Incoming initialisation, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 25/42] Postcopy: Maintain sentmap and calculate discard, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 28/42] Postcopy: Postcopy startup in migration thread, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 29/42] Postcopy end in migration_thread, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 27/42] postcopy: ram_enable_notify to switch on userfault, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 30/42] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 31/42] Page request: Process incoming page request, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 33/42] postcopy_ram.c: place_page and helpers, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 32/42] Page request: Consume pages off the post-copy queue, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 34/42] Postcopy: Use helpers to map pages during migration, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v7 36/42] Host page!=target page: Cleanup bitmaps, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 37/42] Postcopy; Handle userfault requests, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 38/42] Start up a postcopy/listener thread ready for incoming page data, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 39/42] postcopy: Wire up loadvm_postcopy_handle_ commands, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 40/42] End of migration for postcopy, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy, Dr. David Alan Gilbert (git), 2015/06/16
- [Qemu-devel] [PATCH v7 42/42] Inhibit ballooning during postcopy, Dr. David Alan Gilbert (git), 2015/06/16