summaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-03-22 17:42:01 +0100
committerJuan Quintela <quintela@redhat.com>2017-04-21 12:25:40 +0200
commit66103a5796d0003cb198c25d783dcdc1596aef1f (patch)
tree08df831dbf28796819cee7bd5ab9413b02cede51 /migration/ram.c
parentb06424de62b362034e41ddf77eb8cfaa641d9009 (diff)
downloadqemu-66103a5796d0003cb198c25d783dcdc1596aef1f.tar.gz
ram: Remove migration_bitmap_extend()
We have disabled memory hotplug, so we don't need to handle migration_bitamp there. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 2af8080cbb..f48664ec62 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1496,40 +1496,6 @@ static void ram_state_reset(RAMState *rs)
#define MAX_WAIT 50 /* ms, half buffered_file limit */
-void migration_bitmap_extend(ram_addr_t old, ram_addr_t new)
-{
- RAMState *rs = &ram_state;
-
- /* called in qemu main thread, so there is
- * no writing race against this migration_bitmap
- */
- if (rs->ram_bitmap) {
- RAMBitmap *old_bitmap = rs->ram_bitmap, *bitmap;
- bitmap = g_new(RAMBitmap, 1);
- bitmap->bmap = bitmap_new(new);
-
- /* prevent migration_bitmap content from being set bit
- * by migration_bitmap_sync_range() at the same time.
- * it is safe to migration if migration_bitmap is cleared bit
- * at the same time.
- */
- qemu_mutex_lock(&rs->bitmap_mutex);
- bitmap_copy(bitmap->bmap, old_bitmap->bmap, old);
- bitmap_set(bitmap->bmap, old, new - old);
-
- /* We don't have a way to safely extend the sentmap
- * with RCU; so mark it as missing, entry to postcopy
- * will fail.
- */
- bitmap->unsentmap = NULL;
-
- atomic_rcu_set(&rs->ram_bitmap, bitmap);
- qemu_mutex_unlock(&rs->bitmap_mutex);
- rs->migration_dirty_pages += new - old;
- call_rcu(old_bitmap, migration_bitmap_free, rcu);
- }
-}
-
/*
* 'expected' is the value you expect the bitmap mostly to be full
* of; it won't bother printing lines that are all this value.