mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
migration: Move migrate_use_compression() to options.c
Once that we are there, we rename the function to migrate_compress() to be consistent with all other capabilities. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
This commit is contained in:
parent
5e80464455
commit
a7a94d1435
5 changed files with 19 additions and 19 deletions
|
@ -586,7 +586,7 @@ static void compress_threads_save_cleanup(void)
|
|||
{
|
||||
int i, thread_count;
|
||||
|
||||
if (!migrate_use_compression() || !comp_param) {
|
||||
if (!migrate_compress() || !comp_param) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ static int compress_threads_save_setup(void)
|
|||
{
|
||||
int i, thread_count;
|
||||
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
return 0;
|
||||
}
|
||||
thread_count = migrate_compress_threads();
|
||||
|
@ -1155,7 +1155,7 @@ static void migration_update_rates(RAMState *rs, int64_t end_time)
|
|||
rs->xbzrle_bytes_prev = xbzrle_counters.bytes;
|
||||
}
|
||||
|
||||
if (migrate_use_compression()) {
|
||||
if (migrate_compress()) {
|
||||
compression_counters.busy_rate = (double)(compression_counters.busy -
|
||||
rs->compress_thread_busy_prev) / page_count;
|
||||
rs->compress_thread_busy_prev = compression_counters.busy;
|
||||
|
@ -2270,7 +2270,7 @@ int ram_save_queue_pages(const char *rbname, ram_addr_t start, ram_addr_t len)
|
|||
|
||||
static bool save_page_use_compression(RAMState *rs)
|
||||
{
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3734,7 +3734,7 @@ static int wait_for_decompress_done(void)
|
|||
{
|
||||
int idx, thread_count;
|
||||
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3753,7 +3753,7 @@ static void compress_threads_load_cleanup(void)
|
|||
{
|
||||
int i, thread_count;
|
||||
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
return;
|
||||
}
|
||||
thread_count = migrate_decompress_threads();
|
||||
|
@ -3794,7 +3794,7 @@ static int compress_threads_load_setup(QEMUFile *f)
|
|||
{
|
||||
int i, thread_count;
|
||||
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4260,7 +4260,7 @@ static int ram_load_precopy(QEMUFile *f)
|
|||
int flags = 0, ret = 0, invalid_flags = 0, len = 0, i = 0;
|
||||
/* ADVISE is earlier, it shows the source has the postcopy capability on */
|
||||
bool postcopy_advised = migration_incoming_postcopy_advised();
|
||||
if (!migrate_use_compression()) {
|
||||
if (!migrate_compress()) {
|
||||
invalid_flags |= RAM_SAVE_FLAG_COMPRESS_PAGE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue