diff options
author | Rao, Lei <lei.rao@intel.com> | 2021-11-10 16:37:36 +0800 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2021-12-15 10:31:42 +0100 |
commit | 672159a97ce7c1ca2b97bfef439d7994f79b1c61 (patch) | |
tree | 4ded365a131792b7dc94e906dac89005bd3c8dc8 /migration | |
parent | 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e (diff) | |
download | qemu-672159a97ce7c1ca2b97bfef439d7994f79b1c61.zip qemu-672159a97ce7c1ca2b97bfef439d7994f79b1c61.tar.gz qemu-672159a97ce7c1ca2b97bfef439d7994f79b1c61.tar.bz2 |
migration/ram.c: Remove the qemu_mutex_lock in colo_flush_ram_cache.
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>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/ram.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/migration/ram.c b/migration/ram.c index 863035d..2c688f5 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); } /** |