[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/10] ram: Let colo_flush_ram_cache take the bitmap_mutex
From: |
Juan Quintela |
Subject: |
[PULL 02/10] ram: Let colo_flush_ram_cache take the bitmap_mutex |
Date: |
Wed, 10 May 2023 20:09:30 +0200 |
From: Lukas Straub <lukasstraub2@web.de>
This is not required, colo_flush_ram_cache does not run concurrently
with the multifd threads since the cache is only flushed after
everything has been received. But it makes me more comfortable.
This will be used in the next commits to add colo support to multifd.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id:
<35cb23ba854151d38a31e3a5c8a1020e4283cb4a.1683572883.git.lukasstraub2@web.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/ram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index b5d03f85ab..f69d8d42b0 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3814,6 +3814,7 @@ 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);
@@ -3848,6 +3849,7 @@ void colo_flush_ram_cache(void)
}
}
}
+ qemu_mutex_unlock(&ram_state->bitmap_mutex);
trace_colo_flush_ram_cache_end();
}
--
2.40.1
- [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState, (continued)
- [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState, Juan Quintela, 2023/05/09
- [PULL 09/10] migration: disallow change capabilities in COLO state, Juan Quintela, 2023/05/09
- [PULL 08/10] migration: process_incoming_migration_co: simplify code flow around ret, Juan Quintela, 2023/05/09
- [PULL 10/10] migration: block incoming colo when capability is disabled, Juan Quintela, 2023/05/09
- Re: [PULL 00/10] Migration 20230509 patches, Richard Henderson, 2023/05/10
[PULL 00/10] Migration 20230509 patches, Juan Quintela, 2023/05/10
- [PULL 02/10] ram: Let colo_flush_ram_cache take the bitmap_mutex,
Juan Quintela <=
- [PULL 01/10] ram: Add public helper to set colo bitmap, Juan Quintela, 2023/05/10
- [PULL 03/10] multifd: Add the ramblock to MultiFDRecvParams, Juan Quintela, 2023/05/10
- [PULL 05/10] colo: make colo_checkpoint_notify static and provide simpler API, Juan Quintela, 2023/05/10
- [PULL 04/10] block/meson.build: prefer positive condition for replication, Juan Quintela, 2023/05/10
- [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState, Juan Quintela, 2023/05/10
- [PULL 08/10] migration: process_incoming_migration_co: simplify code flow around ret, Juan Quintela, 2023/05/10
- [PULL 06/10] build: move COLO under CONFIG_REPLICATION, Juan Quintela, 2023/05/10
- [PULL 09/10] migration: disallow change capabilities in COLO state, Juan Quintela, 2023/05/10
- [PULL 10/10] migration: block incoming colo when capability is disabled, Juan Quintela, 2023/05/10
- Re: [PULL 00/10] Migration 20230509 patches, Richard Henderson, 2023/05/11