migration: Move busy++ to migrate_with_multithread

And now we can simplify save_compress_page().

Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231019110724.15324-7-quintela@redhat.com>
This commit is contained in:
Juan Quintela 2023-10-19 13:07:19 +02:00
parent b6e19b6de8
commit 250b1d7ef6
2 changed files with 3 additions and 6 deletions

View File

@ -291,6 +291,7 @@ bool compress_page_with_multi_thread(RAMBlock *block, ram_addr_t offset,
}
if (!wait) {
qemu_mutex_unlock(&comp_done_lock);
compression_counters.busy++;
return false;
}
/*

View File

@ -2067,12 +2067,8 @@ static bool save_compress_page(RAMState *rs, PageSearchStatus *pss,
return false;
}
if (compress_page_with_multi_thread(pss->block, offset, send_queued_data)) {
return true;
}
compression_counters.busy++;
return false;
return compress_page_with_multi_thread(pss->block, offset,
send_queued_data);
}
/**