migration: Create ram_compressed_pages()
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Message-ID: <20230613145757.10131-8-quintela@redhat.com>
This commit is contained in:
parent
6f60900573
commit
f504789de5
@ -501,3 +501,9 @@ void populate_compress(MigrationInfo *info)
|
||||
info->compression->compressed_size = compression_counters.compressed_size;
|
||||
info->compression->compression_rate = compression_counters.compression_rate;
|
||||
}
|
||||
|
||||
uint64_t ram_compressed_pages(void)
|
||||
{
|
||||
return compression_counters.pages;
|
||||
}
|
||||
|
||||
|
@ -69,5 +69,6 @@ int compress_threads_load_setup(QEMUFile *f);
|
||||
void decompress_data_with_multi_threads(QEMUFile *f, void *host, int len);
|
||||
|
||||
void populate_compress(MigrationInfo *info);
|
||||
uint64_t ram_compressed_pages(void);
|
||||
|
||||
#endif
|
||||
|
@ -939,7 +939,7 @@ uint64_t ram_get_total_transferred_pages(void)
|
||||
{
|
||||
return stat64_get(&mig_stats.normal_pages) +
|
||||
stat64_get(&mig_stats.zero_pages) +
|
||||
compression_counters.pages + xbzrle_counters.pages;
|
||||
ram_compressed_pages() + xbzrle_counters.pages;
|
||||
}
|
||||
|
||||
static void migration_update_rates(RAMState *rs, int64_t end_time)
|
||||
|
Loading…
Reference in New Issue
Block a user