Skip to content
Snippets Groups Projects
Commit 672159a9 authored by Rao, Lei's avatar Rao, Lei Committed by Juan Quintela
Browse files

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
"63268c49". 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: default avatarLei Rao <lei.rao@intel.com>
Reviewed-by: default avatarZhang Chen <chen.zhang@intel.com>
Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
parent 76b56fdf
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment