transferred = current_bytes - s->iteration_initial_bytes;
time_spent = current_time - s->iteration_start_time;
bandwidth = (double)transferred / time_spent;
- s->threshold_size = bandwidth * s->parameters.downtime_limit;
+ s->threshold_size = bandwidth * migrate_downtime_limit();
s->mbps = (((double) transferred * 8.0) /
((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
*/
migrate_error_free(s);
- s->expected_downtime = s->parameters.downtime_limit;
+ s->expected_downtime = migrate_downtime_limit();
if (resume) {
assert(s->cleanup_bh);
} else {
return s->parameters.decompress_threads;
}
+uint64_t migrate_downtime_limit(void)
+{
+ MigrationState *s = migrate_get_current();
+
+ return s->parameters.downtime_limit;
+}
+
uint8_t migrate_max_cpu_throttle(void)
{
MigrationState *s = migrate_get_current();
uint8_t migrate_cpu_throttle_initial(void);
bool migrate_cpu_throttle_tailslow(void);
int migrate_decompress_threads(void);
+uint64_t migrate_downtime_limit(void);
uint8_t migrate_max_cpu_throttle(void);
uint64_t migrate_max_bandwidth(void);
int64_t migrate_max_postcopy_bandwidth(void);