diff options
author | Juan Quintela <quintela@redhat.com> | 2012-07-20 12:33:00 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-10-17 18:34:58 +0200 |
commit | c6bf8e0e0cf04b40a8a22426e00ebbd727331d8b (patch) | |
tree | d87faa8ac75a2aabd59fb2e685a90bf1d46b8a07 /exec-obsolete.h | |
parent | 3c12193d998249bcbe5099edf85039bcd25c3a80 (diff) |
Separate migration bitmap
This patch creates a migration bitmap, which is periodically kept in
sync with the qemu bitmap. A separate copy of the dirty bitmap for the
migration limits the amount of concurrent access to the qemu bitmap
from iothread and migration thread (which requires taking the big
lock).
We use the qemu bitmap type. We have to "undo" the dirty_pages
counting optimization on the general dirty bitmap and do the counting
optimization with the migration local bitmap.
Signed-off-by: Umesh Deshpande <udeshpan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'exec-obsolete.h')
-rw-r--r-- | exec-obsolete.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/exec-obsolete.h b/exec-obsolete.h index 286e2f75e1..6d35d4b83e 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -75,11 +75,6 @@ static inline int cpu_physical_memory_get_dirty(ram_addr_t start, static inline int cpu_physical_memory_set_dirty_flags(ram_addr_t addr, int dirty_flags) { - if ((dirty_flags & MIGRATION_DIRTY_FLAG) && - !cpu_physical_memory_get_dirty(addr, TARGET_PAGE_SIZE, - MIGRATION_DIRTY_FLAG)) { - ram_list.dirty_pages++; - } return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flags; } @@ -93,11 +88,6 @@ static inline int cpu_physical_memory_clear_dirty_flags(ram_addr_t addr, { int mask = ~dirty_flags; - if ((dirty_flags & MIGRATION_DIRTY_FLAG) && - cpu_physical_memory_get_dirty(addr, TARGET_PAGE_SIZE, - MIGRATION_DIRTY_FLAG)) { - ram_list.dirty_pages--; - } return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] &= mask; } |