[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/18] migration: Create ram_compressed_pages()
From: |
Lukas Straub |
Subject: |
Re: [PATCH 07/18] migration: Create ram_compressed_pages() |
Date: |
Thu, 22 Jun 2023 13:45:36 +0200 |
On Tue, 13 Jun 2023 16:57:46 +0200
Juan Quintela <quintela@redhat.com> wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> fix ram_compress
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit message is off. Other than that:
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
> ---
> migration/ram-compress.h | 1 +
> migration/ram-compress.c | 6 ++++++
> migration/ram.c | 2 +-
> 3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/migration/ram-compress.h b/migration/ram-compress.h
> index 43ff44c0ba..77465dad4b 100644
> --- a/migration/ram-compress.h
> +++ b/migration/ram-compress.h
> @@ -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
> diff --git a/migration/ram-compress.c b/migration/ram-compress.c
> index a91c32588e..c48d5c53f6 100644
> --- a/migration/ram-compress.c
> +++ b/migration/ram-compress.c
> @@ -502,3 +502,9 @@ void populate_compress(MigrationInfo *info)
> compression_counters.compression_rate;
> }
> }
> +
> +uint64_t ram_compressed_pages(void)
> +{
> + return compression_counters.pages;
> +}
> +
> diff --git a/migration/ram.c b/migration/ram.c
> index d4943b982f..13c518f81a 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -927,7 +927,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)
pgpxmbJSZ8S9_.pgp
Description: OpenPGP digital signature
- [PATCH 00/18] Migration compression cleanup, Juan Quintela, 2023/06/13
- [PATCH 01/18] migration: Give one error if trying to set MULTIFD and XBZRLE, Juan Quintela, 2023/06/13
- [PATCH 04/18] migration: Remove save_page_use_compression(), Juan Quintela, 2023/06/13
- [PATCH 07/18] migration: Create ram_compressed_pages(), Juan Quintela, 2023/06/13
- Re: [PATCH 07/18] migration: Create ram_compressed_pages(),
Lukas Straub <=
- [PATCH 03/18] migration: RDMA is not compatible with anything else, Juan Quintela, 2023/06/13
- [PATCH 02/18] migration: Give one error if trying to set COMPRESSION and XBZRLE, Juan Quintela, 2023/06/13
- [PATCH 08/18] migration: Move update_compress_threads_counts() to ram-compress.c, Juan Quintela, 2023/06/13
- [PATCH 09/18] migration: Make compress_data_with_multithreads return bool, Juan Quintela, 2023/06/13
- [PATCH 06/18] migration: Create populate_compress(), Juan Quintela, 2023/06/13