[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/18] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_r
From: |
Juan Quintela |
Subject: |
[PULL 01/18] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache. |
Date: |
Wed, 15 Dec 2021 11:32:01 +0100 |
From: "Rao, Lei" <lei.rao@intel.com>
The code to acquire bitmap_mutex is added in the commit of
"63268c4970a5f126cc9af75f3ccb8057abef5ec0". There is no
need to acquire bitmap_mutex in colo_flush_ram_cache(). This
is because the colo_flush_ram_cache only be called on the COLO
secondary VM, which is the destination side.
On the COLO secondary VM, only the COLO thread will touch
the bitmap of ram cache.
Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/ram.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 863035d235..2c688f5bbb 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3918,7 +3918,6 @@ void colo_flush_ram_cache(void)
unsigned long offset = 0;
memory_global_dirty_log_sync();
- qemu_mutex_lock(&ram_state->bitmap_mutex);
WITH_RCU_READ_LOCK_GUARD() {
RAMBLOCK_FOREACH_NOT_IGNORED(block) {
ramblock_sync_dirty_bitmap(ram_state, block);
@@ -3954,7 +3953,6 @@ void colo_flush_ram_cache(void)
}
}
trace_colo_flush_ram_cache_end();
- qemu_mutex_unlock(&ram_state->bitmap_mutex);
}
/**
--
2.33.1
- [PULL 00/18] Migration 20211214 patches, Juan Quintela, 2021/12/15
- [PULL 01/18] migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache.,
Juan Quintela <=
- [PULL 03/18] Fixed a QEMU hang when guest poweroff in COLO mode, Juan Quintela, 2021/12/15
- [PULL 04/18] migration/colo: Optimize COLO primary node start code path, Juan Quintela, 2021/12/15
- [PULL 05/18] migration: Remove is_zero_range(), Juan Quintela, 2021/12/15
- [PULL 06/18] dump: Remove is_zero_page(), Juan Quintela, 2021/12/15
- [PULL 08/18] migration: Never call twice qemu_target_page_size(), Juan Quintela, 2021/12/15
- [PULL 02/18] migration/colo: More accurate update checkpoint time, Juan Quintela, 2021/12/15
- [PULL 11/18] multifd: The variable is only used inside the loop, Juan Quintela, 2021/12/15
- [PULL 09/18] multifd: Rename used field to num, Juan Quintela, 2021/12/15
- [PULL 07/18] multifd: Delete useless operation, Juan Quintela, 2021/12/15
- [PULL 12/18] multifd: remove used parameter from send_prepare() method, Juan Quintela, 2021/12/15