[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 59/65] ram: Remove migration_bitmap_extend()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 59/65] ram: Remove migration_bitmap_extend() |
Date: |
Fri, 21 Apr 2017 13:56:40 +0200 |
We have disabled memory hotplug, so we don't need to handle
migration_bitamp there.
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: zhanghailiang <address@hidden>
---
exec.c | 1 -
include/exec/ram_addr.h | 2 --
migration/ram.c | 34 ----------------------------------
3 files changed, 37 deletions(-)
diff --git a/exec.c b/exec.c
index de843f4..c2def9e 100644
--- a/exec.c
+++ b/exec.c
@@ -1758,7 +1758,6 @@ static void ram_block_add(RAMBlock *new_block, Error
**errp)
new_ram_size = MAX(old_ram_size,
(new_block->offset + new_block->max_length) >> TARGET_PAGE_BITS);
if (new_ram_size > old_ram_size) {
- migration_bitmap_extend(old_ram_size, new_ram_size);
dirty_memory_extend(old_ram_size, new_ram_size);
}
/* Keep the list sorted from biggest to smallest block. Unlike QTAILQ,
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index a8411c7..c9ddcd0 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -413,7 +413,5 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned
long *dest,
return num_dirty;
}
-
-void migration_bitmap_extend(ram_addr_t old, ram_addr_t new);
#endif
#endif
diff --git a/migration/ram.c b/migration/ram.c
index 2af8080..f48664e 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.
--
2.9.3
- [Qemu-devel] [PULL 47/65] ram: reorganize last_sent_block, (continued)
- [Qemu-devel] [PULL 47/65] ram: reorganize last_sent_block, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 48/65] ram: Use page number instead of an address for the bitmap operations, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 49/65] ram: Remember last_page instead of last_offset, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 50/65] ram: Change offset field in PageSearchStatus to page, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 52/65] ram: rename last_ram_offset() last_ram_pages(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 54/65] migration: Remove MigrationState parameter from migration_is_idle(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 51/65] ram: Use ramblock and page offset instead of absolute offset, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 53/65] ram: Use RAMBitmap type for coherence, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 55/65] qdev: qdev_hotplug is really a bool, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 56/65] qdev: Export qdev_hot_removed, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 59/65] ram: Remove migration_bitmap_extend(),
Juan Quintela <=
- [Qemu-devel] [PULL 58/65] migration: Disable hotplug/unplug during migration, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 57/65] qdev: Move qdev_unplug() to qdev-monitor.c, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 60/65] migration: don't close a file descriptor while it can be in use, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 61/65] virtio-rng: stop virtqueue while the CPU is stopped, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 62/65] migration: set current_active_state once, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 65/65] hmp: info migrate_parameters format tunes, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 64/65] hmp: info migrate_capability format tunes, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 63/65] migration: rename max_size to threshold_size, Juan Quintela, 2017/04/21
- Re: [Qemu-devel] [PULL 00/65] Migration pull request, Peter Maydell, 2017/04/21