All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Chen" <chen.zhang@intel.com>
To: "Rao, Lei" <lei.rao@intel.com>,
	"lizhijian@cn.fujitsu.com" <lizhijian@cn.fujitsu.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"quintela@redhat.com" <quintela@redhat.com>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: RE: [PATCH v2 2/3] Reduce the time of checkpoint for COLO
Date: Wed, 23 Sep 2020 01:25:20 +0000	[thread overview]
Message-ID: <b9ca78217db34fb2abebde21994580ff@intel.com> (raw)
In-Reply-To: <1600766690-94980-3-git-send-email-lei.rao@intel.com>



> -----Original Message-----
> From: Rao, Lei <lei.rao@intel.com>
> Sent: Tuesday, September 22, 2020 5:25 PM
> To: Zhang, Chen <chen.zhang@intel.com>; lizhijian@cn.fujitsu.com;
> jasowang@redhat.com; quintela@redhat.com; dgilbert@redhat.com;
> pbonzini@redhat.com
> Cc: qemu-devel@nongnu.org; Rao, Lei <lei.rao@intel.com>
> Subject: [PATCH v2 2/3] Reduce the time of checkpoint for COLO
> 
> we should set ram_bulk_stage to false after ram_state_init, otherwise the
> bitmap will be unused in migration_bitmap_find_dirty.
> all pages in ram cache will be flushed to the ram of secondary guest for each
> checkpoint.
> 
> Signed-off-by: leirao <lei.rao@intel.com>

Reviewed-by: Zhang Chen <chen.zhang@intel.com>

Thanks
Zhang Chen

> ---
>  migration/ram.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/migration/ram.c b/migration/ram.c index 76d4fee..59ff0cf 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -3018,6 +3018,18 @@ static void
> decompress_data_with_multi_threads(QEMUFile *f,
>      qemu_mutex_unlock(&decomp_done_lock);
>  }
> 
> + /*
> +  * we must set ram_bulk_stage to fasle, otherwise in
> +  * migation_bitmap_find_dirty the bitmap will be unused and
> +  * all the pages in ram cache wil be flushed to the ram of
> +  * secondary VM.
> +  */
> +static void colo_init_ram_state(void)
> +{
> +    ram_state_init(&ram_state);
> +    ram_state->ram_bulk_stage = false;
> +}
> +
>  /*
>   * colo cache: this is for secondary VM, we cache the whole
>   * memory of the secondary VM, it is need to hold the global lock @@ -
> 3061,7 +3073,7 @@ int colo_init_ram_cache(void)
>          }
>      }
> 
> -    ram_state_init(&ram_state);
> +    colo_init_ram_state();
>      return 0;
>  }
> 
> --
> 1.8.3.1



  reply	other threads:[~2020-09-23  1:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  9:24 [PATCH v2 0/3] Optimized some code for COLO leirao
2020-09-22  9:24 ` [PATCH v2 1/3] Optimize seq_sorter function for colo-compare leirao
2020-09-23  1:20   ` Zhang, Chen
2020-09-22  9:24 ` [PATCH v2 2/3] Reduce the time of checkpoint for COLO leirao
2020-09-23  1:25   ` Zhang, Chen [this message]
2020-09-23  3:59   ` Li Zhijian
2020-09-22  9:24 ` [PATCH v2 3/3] Fix the qemu crash when guest shutdown in COLO mode leirao
2020-09-23  1:27   ` Zhang, Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9ca78217db34fb2abebde21994580ff@intel.com \
    --to=chen.zhang@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lei.rao@intel.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.