mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
ram: Remove ram_save_remaining
Just unfold it. Move ram_bytes_remaining() with the rest of exported functions. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
072c251157
commit
9edabd4de6
@ -244,16 +244,16 @@ uint64_t xbzrle_mig_pages_overflow(void)
|
||||
return ram_state.xbzrle_overflows;
|
||||
}
|
||||
|
||||
static ram_addr_t ram_save_remaining(void)
|
||||
{
|
||||
return ram_state.migration_dirty_pages;
|
||||
}
|
||||
|
||||
uint64_t ram_bytes_transferred(void)
|
||||
{
|
||||
return ram_state.bytes_transferred;
|
||||
}
|
||||
|
||||
uint64_t ram_bytes_remaining(void)
|
||||
{
|
||||
return ram_state.migration_dirty_pages * TARGET_PAGE_SIZE;
|
||||
}
|
||||
|
||||
/* used by the search for pages to send */
|
||||
struct PageSearchStatus {
|
||||
/* Current block being searched */
|
||||
@ -1440,11 +1440,6 @@ void acct_update_position(QEMUFile *f, size_t size, bool zero)
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t ram_bytes_remaining(void)
|
||||
{
|
||||
return ram_save_remaining() * TARGET_PAGE_SIZE;
|
||||
}
|
||||
|
||||
uint64_t ram_bytes_total(void)
|
||||
{
|
||||
RAMBlock *block;
|
||||
@ -2212,7 +2207,7 @@ static void ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
|
||||
RAMState *rs = opaque;
|
||||
uint64_t remaining_size;
|
||||
|
||||
remaining_size = ram_save_remaining() * TARGET_PAGE_SIZE;
|
||||
remaining_size = rs->migration_dirty_pages * TARGET_PAGE_SIZE;
|
||||
|
||||
if (!migration_in_postcopy(migrate_get_current()) &&
|
||||
remaining_size < max_size) {
|
||||
@ -2221,7 +2216,7 @@ static void ram_save_pending(QEMUFile *f, void *opaque, uint64_t max_size,
|
||||
migration_bitmap_sync(rs);
|
||||
rcu_read_unlock();
|
||||
qemu_mutex_unlock_iothread();
|
||||
remaining_size = ram_save_remaining() * TARGET_PAGE_SIZE;
|
||||
remaining_size = rs->migration_dirty_pages * TARGET_PAGE_SIZE;
|
||||
}
|
||||
|
||||
/* We can do postcopy, and all the data is postcopiable */
|
||||
|
Loading…
Reference in New Issue
Block a user