All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rao, Lei" <lei.rao@intel.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>,
	"Zhang, Chen" <chen.zhang@intel.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 2/3] Reduce the time of checkpoint for COLO
Date: Tue, 22 Sep 2020 09:11:22 +0000	[thread overview]
Message-ID: <SN6PR11MB31037B5FD4C80FEFCAFCA335FD3B0@SN6PR11MB3103.namprd11.prod.outlook.com> (raw)
In-Reply-To: <81e419c4-e844-aa01-c762-175ea547e93e@cn.fujitsu.com>

Got it.
It looks more reasonable. Will be changed in V2.

Thanks,
Lei.

-----Original Message-----
From: Li Zhijian <lizhijian@cn.fujitsu.com> 
Sent: Tuesday, September 22, 2020 2:58 PM
To: Rao, Lei <lei.rao@intel.com>; Zhang, Chen <chen.zhang@intel.com>; jasowang@redhat.com; quintela@redhat.com; dgilbert@redhat.com; pbonzini@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/3] Reduce the time of checkpoint for COLO



On 9/19/20 11:10 AM, leirao wrote:
> 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>
> ---
>   migration/ram.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/migration/ram.c b/migration/ram.c index 76d4fee..6a2b6c1 
> 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -3019,6 +3019,17 @@ static void decompress_data_with_multi_threads(QEMUFile *f,
>   }
>   
>   /*
> + * 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_set_ram_state(RAMState *rsp)
this function name is too general, how about

colo_init_ram_state(ram_state)
{
     ram_state_init(&ram_state);
     ram_state->ram_bulk_stage = false;
}

Thanks
Zhijian

> +{
> +    rsp->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
>    * to call this helper.
> @@ -3062,6 +3073,7 @@ int colo_init_ram_cache(void)
>       }
>   
>       ram_state_init(&ram_state);
> +    colo_set_ram_state(ram_state);
>       return 0;
>   }
>   




  reply	other threads:[~2020-09-22  9:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19  3:10 [PATCH 0/3] Optimized some code for COLO leirao
2020-09-19  3:10 ` [PATCH 1/3] Optimize seq_sorter function for colo-compare leirao
2020-09-22  6:49   ` Li Zhijian
2020-09-19  3:10 ` [PATCH 2/3] Reduce the time of checkpoint for COLO leirao
2020-09-22  6:57   ` Li Zhijian
2020-09-22  9:11     ` Rao, Lei [this message]
2020-09-19  3:10 ` [PATCH 3/3] Fix the qemu crash when guest shutdown in COLO mode leirao

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=SN6PR11MB31037B5FD4C80FEFCAFCA335FD3B0@SN6PR11MB3103.namprd11.prod.outlook.com \
    --to=lei.rao@intel.com \
    --cc=chen.zhang@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.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.