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

Re: [Xen-devel] [RFC PATCH COLO v5 04/29] Update libxl__domain_suspend_common_switch_qemu_logdirty() for colo



On Wed, Apr 01, 2015 at 02:41:40PM +0800, Yang Hongyang wrote:
> From: Wen Congyang <wency@xxxxxxxxxxxxxx>
> 
> Secondary vm is running in colo mode. So we need to
> send secondary vm's dirty page information to master.
> libxl__domain_suspend_common_switch_qemu_logdirty() is to enable
> qemu logdirty. But it uses domain_suspend_state, and calls
> libxl__xc_domain_saverestore_async_callback_done()
> before exits.
> 
> Introduce a new API libxl__domain_common_switch_qemu_logdirty().
> This API only uses libxl__logdirty_switch, and calls
> lds->callback before exits.
> 

I have some dumb questions. What is the purpose of this refactoring? How
are the refactoring and new API related to your intended
functionalities? You mention you need to send back secondary vm state to
master, where is it done / will it be done?

> Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
> ---
[...]
>  
>  /*----- callbacks, called by xc_domain_save -----*/
> @@ -2001,6 +2019,7 @@ void libxl__domain_suspend(libxl__egc *egc, 
> libxl__domain_suspend_state *dss)
>      libxl__domain_suspend_state2 *dss2 = &dss->dss2;
>  
>      logdirty_init(&dss->logdirty);
> +    dss->logdirty.ao = ao;
>      libxl__xswait_init(&dss2->pvcontrol);
>      libxl__ev_evtchn_init(&dss2->guest_evtchn);
>      libxl__ev_xswatch_init(&dss2->guest_watch);
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 3b4e6c4..6470866 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -2812,13 +2812,18 @@ typedef void libxl__domain_suspend_cb(libxl__egc*,
>  typedef void libxl__save_device_model_cb(libxl__egc*,
>                                           libxl__domain_suspend_state*, int 
> rc);
>  
> -typedef struct libxl__logdirty_switch {
> +typedef struct libxl__logdirty_switch libxl__logdirty_switch;

This change looks unnecessary.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.