[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 46/57] Don't sync dirty bitmaps in postcopy
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 46/57] Don't sync dirty bitmaps in postcopy |
Date: |
Mon, 9 Nov 2015 18:28:50 +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>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/ram.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 8bf0841..339b001 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1846,7 +1846,9 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
{
rcu_read_lock();
- migration_bitmap_sync();
+ if (!migration_in_postcopy(migrate_get_current())) {
+ migration_bitmap_sync();
+ }
ram_control_before_iterate(f, RAM_CONTROL_FINISH);
@@ -1881,7 +1883,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_in_postcopy(migrate_get_current()) &&
+ remaining_size < max_size) {
qemu_mutex_lock_iothread();
rcu_read_lock();
migration_bitmap_sync();
--
2.5.0
- Re: [Qemu-devel] [PULL 29/57] migrate_start_postcopy: Command to trigger transition to postcopy, (continued)
- [Qemu-devel] [PULL 33/57] Add qemu_savevm_state_complete_postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 35/57] migration_completion: Take current state, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 36/57] postcopy: Incoming initialisation, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 34/57] Postcopy: Maintain unsentmap, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 38/57] Postcopy: Postcopy startup in migration thread, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 37/57] postcopy: ram_enable_notify to switch on userfault, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 39/57] Postcopy: End of iteration, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 40/57] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 42/57] Page request: Consume pages off the post-copy queue, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 46/57] Don't sync dirty bitmaps in postcopy,
Juan Quintela <=
- [Qemu-devel] [PULL 44/57] Postcopy: Use helpers to map pages during migration, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 43/57] postcopy_ram.c: place_page and helpers, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 49/57] Round up RAMBlock sizes to host page sizes, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 41/57] Page request: Process incoming page request, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 47/57] Don't iterate on precopy-only devices during postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 45/57] postcopy: Check order of received target pages, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 52/57] postcopy: Wire up loadvm_postcopy_handle_ commands, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 54/57] End of migration for postcopy, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 50/57] Postcopy; Handle userfault requests, Juan Quintela, 2015/11/09
- [Qemu-devel] [PULL 53/57] Postcopy: Mark nohugepage before discard, Juan Quintela, 2015/11/09