[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/33] migration: just pass RAMBlock is enough
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PULL 15/33] migration: just pass RAMBlock is enough |
Date: |
Thu, 15 Aug 2019 17:34:46 +0100 |
From: Wei Yang <address@hidden>
RAMBlock->used_length is always passed to migration_bitmap_sync_range(),
which could be retrieved from RAMBlock.
Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/ram.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 255f289bbb..97f241d6d9 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1748,11 +1748,10 @@ static inline bool
migration_bitmap_clear_dirty(RAMState *rs,
}
/* Called with RCU critical section */
-static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb,
- ram_addr_t length)
+static void migration_bitmap_sync_range(RAMState *rs, RAMBlock *rb)
{
rs->migration_dirty_pages +=
- cpu_physical_memory_sync_dirty_bitmap(rb, 0, length,
+ cpu_physical_memory_sync_dirty_bitmap(rb, 0, rb->used_length,
&rs->num_dirty_pages_period);
}
@@ -1841,7 +1840,7 @@ static void migration_bitmap_sync(RAMState *rs)
qemu_mutex_lock(&rs->bitmap_mutex);
rcu_read_lock();
RAMBLOCK_FOREACH_NOT_IGNORED(block) {
- migration_bitmap_sync_range(rs, block, block->used_length);
+ migration_bitmap_sync_range(rs, block);
}
ram_counters.remaining = ram_bytes_remaining();
rcu_read_unlock();
@@ -4293,7 +4292,7 @@ static void colo_flush_ram_cache(void)
memory_global_dirty_log_sync();
rcu_read_lock();
RAMBLOCK_FOREACH_NOT_IGNORED(block) {
- migration_bitmap_sync_range(ram_state, block, block->used_length);
+ migration_bitmap_sync_range(ram_state, block);
}
rcu_read_unlock();
--
2.21.0
- [Qemu-devel] [PULL 04/33] migration/postcopy: the valid condition is one less then end, (continued)
- [Qemu-devel] [PULL 04/33] migration/postcopy: the valid condition is one less then end, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 06/33] migration/postcopy: discard_length must not be 0, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 07/33] migration/postcopy: reduce one operation to calculate fixup_start_addr, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 08/33] migration/postcopy: do_fixup is true when host_offset is non-zero, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 09/33] migration/savevm: flush file for iterable_only case, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 10/33] migration/savevm: split qemu_savevm_state_complete_precopy() into two parts, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 11/33] migration/savevm: move non SaveStateEntry condition check out of iteration, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 12/33] migration/postcopy: PostcopyState is already set in loadvm_postcopy_handle_advise(), Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 13/33] migration/postcopy: start_postcopy could be true only when migrate_postcopy() return true, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 14/33] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 15/33] migration: just pass RAMBlock is enough,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PULL 17/33] migration: return -EINVAL directly when version_id mismatch, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 16/33] migration: equation is more proper than and to check LOADVM_QUIT, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 18/33] migration: extract ram_load_precopy, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 19/33] migration/postcopy: make PostcopyDiscardState a static variable, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 20/33] migration/postcopy: simplify calculation of run_start and fixup_start_addr, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 21/33] migration/postcopy: use QEMU_IS_ALIGNED to replace host_offset, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 22/33] hmp: Remove migration capabilities from "info migrate", Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 23/33] migration: remove unused field bytes_xfer, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 24/33] migration: always initialise ram_counters for a new migration, Dr. David Alan Gilbert (git), 2019/08/15
- [Qemu-devel] [PULL 25/33] migration: add qemu_file_update_transfer interface, Dr. David Alan Gilbert (git), 2019/08/15