migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro
PATCH 1/1 migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro
migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro
--- migration/ram.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
migration/ram.c +6 -6
@@ -1066,14 +1066,14 @@ static void migration_bitmap_sync(RAMState *rs, bool last_stage)trace_migration_bitmap_sync_start ();memory_global_dirty_log_sync (last_stage); -qemu_mutex_lock (&rs->bitmap_mutex); - WITH_RCU_READ_LOCK_GUARD() { -RAMBLOCK_FOREACH_NOT_IGNORED (block) { -ramblock_sync_dirty_bitmap (rs, block); + WITH_QEMU_LOCK_GUARD(&rs->bitmap_mutex) { + WITH_RCU_READ_LOCK_GUARD() { +RAMBLOCK_FOREACH_NOT_IGNORED (block) { +ramblock_sync_dirty_bitmap (rs, block); + } +stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -qemu_mutex_unlock (&rs->bitmap_mutex);memory_global_after_dirty_log_sync ();trace_migration_bitmap_sync_end (rs->num_dirty_pages_period);
Signature · 1 line
2.25.1
A message that is not in the archive (sent off-list or not yet received): CADe4k3+GQGSSbbugg-BK6TNp5cJzLSxBTrS0fL3RCfOtV3wx0Q@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): ZipWSkApNVq2SyS9@x1n
Quoted 1 line · Peter Xu
Hi,
And I just noticed you didn't copy the list, please normally keep copying the list in replies. So before below links, you can also read this first just in case you still miss some:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html
Quoted 63 lines · Vilhelm Gyda
Quoted 5 lines
Hi, I am new here. This trivial patch is my first contribution. I am not sure who to cc for the review. Checking qemu/MAINTAINERS you guys seemed to be most relevant for this patch. I am looking for what to contribute next, let me know if you guys have any ideas on that. Thanks
Maybe can start with looking at some bugs (see the end of the page below), or todos listed here that you think you have an idea to move on:
https://wiki.qemu.org/ToDo/LiveMigration
Quoted 7 lines · Will Gyda
Quoted 5 lines
migration/ram.c: API Conversionqemu_mutex_lock(), andqemu_mutex_unlock()toWITH_QEMU_LOCK_GUARDmacroSigned-off-by Will Gyda <[email protected]>The patch looks okay:
Reviewed-by Peter Xu <[email protected]>Thanks,
Quoted 33 lines
Quoted 32 lines
--- migration/ram.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)migration/ram.c +6
-7@@ -1066,14 +1066,14 @@ static void migration_bitmap_sync(RAMState *rs, bool last_stage)trace_migration_bitmap_sync_start ();memory_global_dirty_log_sync (last_stage); -qemu_mutex_lock (&rs->bitmap_mutex); - WITH_RCU_READ_LOCK_GUARD() { -RAMBLOCK_FOREACH_NOT_IGNORED (block) { -ramblock_sync_dirty_bitmap (rs, block); + WITH_QEMU_LOCK_GUARD(&rs->bitmap_mutex) { + WITH_RCU_READ_LOCK_GUARD() { +RAMBLOCK_FOREACH_NOT_IGNORED (block) { +ramblock_sync_dirty_bitmap (rs, block); + } +stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -qemu_mutex_unlock (&rs->bitmap_mutex);memory_global_after_dirty_log_sync ();trace_migration_bitmap_sync_end (rs->num_dirty_pages_period); --2.25.1
Signature · 1 line
Peter Xu
Signature · 1 line
Peter Xu
Yes, yes. The list will always be cc'd. I found your email after I had already sent on the list, so I omitted the list when I sent it to you. Thanks for the suggestion for further contribution. I am looking at them
Quoted 77 lines · Peter Xu
Quoted 1 line · Peter Xu
Hi,
And I just noticed you didn't copy the list, please normally keep copying the list in replies. So before below links, you can also read this first just in case you still miss some:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html
Quoted 61 lines · Vilhelm Gyda
Quoted 5 lines
Hi, I am new here. This trivial patch is my first contribution. I am not sure who to cc for the review. Checking qemu/MAINTAINERS you guys seemed to be most relevant for this patch. I am looking for what to contribute next, let me know if you guys have any ideas on that. Thanks
Maybe can start with looking at some bugs (see the end of the page below), or todos listed here that you think you have an idea to move on:
https://wiki.qemu.org/ToDo/LiveMigration
Quoted 7 lines · Will Gyda
Quoted 5 lines
migration/ram.c: API Conversionqemu_mutex_lock(), andqemu_mutex_unlock()toWITH_QEMU_LOCK_GUARDmacroSigned-off-by Will Gyda <[email protected]>The patch looks okay:
Reviewed-by Peter Xu <[email protected]>Thanks,
Quoted 27 lines
Quoted 27 lines
--- migration/ram.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)migration/ram.c +6
-6@@ -1066,14 +1066,14 @@ static void migration_bitmap_sync(RAMState *rs, bool last_stage)trace_migration_bitmap_sync_start ();memory_global_dirty_log_sync (last_stage); -qemu_mutex_lock (&rs->bitmap_mutex); - WITH_RCU_READ_LOCK_GUARD() { -RAMBLOCK_FOREACH_NOT_IGNORED (block) { -ramblock_sync_dirty_bitmap (rs, block); + WITH_QEMU_LOCK_GUARD(&rs->bitmap_mutex) { + WITH_RCU_READ_LOCK_GUARD() { +RAMBLOCK_FOREACH_NOT_IGNORED (block) { +ramblock_sync_dirty_bitmap (rs, block); + } +stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -stat64_set (&mig_stats.dirty_bytes_last_sync,ram_bytes_remaining ()); } -qemu_mutex_unlock (&rs->bitmap_mutex);Quoted 6 lines
Quoted 5 lines
migration/ram.c +0
-1memory_global_after_dirty_log_sync ();trace_migration_bitmap_sync_end (rs->num_dirty_pages_period); --2.25.1
Quoted 2 lines
--
Peter Xu--
Peter Xu