diff options
-rw-r--r-- | migration/options.c | 9 | ||||
-rw-r--r-- | migration/options.h | 1 | ||||
-rw-r--r-- | migration/ram.c | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/migration/options.c b/migration/options.c index 418aafa..f7fb699 100644 --- a/migration/options.c +++ b/migration/options.c @@ -509,6 +509,15 @@ int migrate_compress_wait_thread(void) return s->parameters.compress_wait_thread; } +uint8_t migrate_cpu_throttle_initial(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.cpu_throttle_initial; +} + int migrate_decompress_threads(void) { MigrationState *s; diff --git a/migration/options.h b/migration/options.h index 72b1a32..fd8b91d 100644 --- a/migration/options.h +++ b/migration/options.h @@ -50,6 +50,7 @@ uint32_t migrate_checkpoint_delay(void); int migrate_compress_level(void); int migrate_compress_threads(void); int migrate_compress_wait_thread(void); +uint8_t migrate_cpu_throttle_initial(void); int migrate_decompress_threads(void); uint8_t migrate_max_cpu_throttle(void); int64_t migrate_max_postcopy_bandwidth(void); diff --git a/migration/ram.c b/migration/ram.c index 5c78651..5e855d5 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -712,7 +712,7 @@ static void mig_throttle_guest_down(uint64_t bytes_dirty_period, uint64_t bytes_dirty_threshold) { MigrationState *s = migrate_get_current(); - uint64_t pct_initial = s->parameters.cpu_throttle_initial; + uint64_t pct_initial = migrate_cpu_throttle_initial(); uint64_t pct_increment = s->parameters.cpu_throttle_increment; bool pct_tailslow = s->parameters.cpu_throttle_tailslow; int pct_max = migrate_max_cpu_throttle(); |