aboutsummaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c
index f48cf4b0a5..863035d235 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -641,6 +641,15 @@ static void mig_throttle_guest_down(uint64_t bytes_dirty_period,
}
}
+void mig_throttle_counter_reset(void)
+{
+ RAMState *rs = ram_state;
+
+ rs->time_last_bitmap_sync = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
+ rs->num_dirty_pages_period = 0;
+ rs->bytes_xfer_prev = ram_counters.transferred;
+}
+
/**
* xbzrle_cache_zero_page: insert a zero page in the XBZRLE cache
*