qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 23/23] migration: Use multifd before we check for the zero


From: Dr. David Alan Gilbert
Subject: Re: [PATCH v3 23/23] migration: Use multifd before we check for the zero page
Date: Thu, 2 Dec 2021 17:11:51 +0000
User-agent: Mutt/2.1.3 (2021-09-10)

* Juan Quintela (quintela@redhat.com) wrote:
> So we use multifd to transmit zero pages.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration/ram.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/migration/ram.c b/migration/ram.c
> index 57efa67f20..3ae094f653 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -2138,6 +2138,17 @@ static int ram_save_target_page(RAMState *rs, 
> PageSearchStatus *pss,
>      ram_addr_t offset = ((ram_addr_t)pss->page) << TARGET_PAGE_BITS;
>      int res;
>  
> +    /*
> +     * Do not use multifd for:
> +     * 1. Compression as the first page in the new block should be posted out
> +     *    before sending the compressed page
> +     * 2. In postcopy as one whole host page should be placed
> +     */
> +    if (!save_page_use_compression(rs) && migrate_use_multifd()
> +        && !migration_in_postcopy()) {
> +        return ram_save_multifd_page(rs, block, offset);
> +    }
> +
>      if (control_save_page(rs, block, offset, &res)) {
>          return res;
>      }

Although I don't think it currently matters, I think that should be
after the control_save_page.

Dave

> @@ -2160,17 +2171,6 @@ static int ram_save_target_page(RAMState *rs, 
> PageSearchStatus *pss,
>          return res;
>      }
>  
> -    /*
> -     * Do not use multifd for:
> -     * 1. Compression as the first page in the new block should be posted out
> -     *    before sending the compressed page
> -     * 2. In postcopy as one whole host page should be placed
> -     */
> -    if (!save_page_use_compression(rs) && migrate_use_multifd()
> -        && !migration_in_postcopy()) {
> -        return ram_save_multifd_page(rs, block, offset);
> -    }
> -
>      return ram_save_page(rs, pss, last_stage);
>  }
>  
> -- 
> 2.33.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]