[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 04/14] libxc/migration: Pass checkpoint information into the save algorithm.
On Wed, 2015-05-13 at 09:53 +0800, Yang Hongyang wrote: > From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> OOI how was this signalled to the old code? > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> > CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > CC: Wei Liu <wei.liu2@xxxxxxxxxx> > CC: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> > --- > tools/libxc/include/xenguest.h | 1 + > tools/libxc/xc_sr_common.h | 3 +++ > tools/libxc/xc_sr_save.c | 3 +++ > tools/libxl/libxl_dom.c | 1 + > 4 files changed, 8 insertions(+) > > diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h > index 8e39075..7581263 100644 > --- a/tools/libxc/include/xenguest.h > +++ b/tools/libxc/include/xenguest.h > @@ -30,6 +30,7 @@ > #define XCFLAGS_HVM (1 << 2) > #define XCFLAGS_STDVGA (1 << 3) > #define XCFLAGS_CHECKPOINT_COMPRESS (1 << 4) > +#define XCFLAGS_CHECKPOINTED (1 << 5) > > #define X86_64_B_SIZE 64 > #define X86_32_B_SIZE 32 > diff --git a/tools/libxc/xc_sr_common.h b/tools/libxc/xc_sr_common.h > index c4fe92c..c0f90d4 100644 > --- a/tools/libxc/xc_sr_common.h > +++ b/tools/libxc/xc_sr_common.h > @@ -174,6 +174,9 @@ struct xc_sr_context > /* Live migrate vs non live suspend. */ > bool live; > > + /* Plain VM, or checkpoints over time. */ > + bool checkpointed; > + > /* Further debugging information in the stream. */ > bool debug; > > diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c > index 66fcd3e..caa727d 100644 > --- a/tools/libxc/xc_sr_save.c > +++ b/tools/libxc/xc_sr_save.c > @@ -732,6 +732,7 @@ int xc_domain_save2(xc_interface *xch, int io_fd, > uint32_t dom, > ctx.save.callbacks = callbacks; > ctx.save.live = !!(flags & XCFLAGS_LIVE); > ctx.save.debug = !!(flags & XCFLAGS_DEBUG); > + ctx.save.checkpointed = !!(flags & XCFLAGS_CHECKPOINTED); > > /* > * TODO: Find some time to better tweak the live migration algorithm. > @@ -745,6 +746,8 @@ int xc_domain_save2(xc_interface *xch, int io_fd, > uint32_t dom, > /* Sanity checks for callbacks. */ > if ( hvm ) > assert(callbacks->switch_qemu_logdirty); > + if ( ctx.save.checkpointed ) > + assert(callbacks->checkpoint && callbacks->postcopy); > > IPRINTF("In experimental %s", __func__); > DPRINTF("fd %d, dom %u, max_iters %u, max_factor %u, flags %u, hvm %d", > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > index f408646..a0c9850 100644 > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > @@ -2003,6 +2003,7 @@ void libxl__domain_suspend(libxl__egc *egc, > libxl__domain_suspend_state *dss) > > if (r_info != NULL) { > dss->interval = r_info->interval; > + dss->xcflags |= XCFLAGS_CHECKPOINTED; > if (libxl_defbool_val(r_info->compression)) > dss->xcflags |= XCFLAGS_CHECKPOINT_COMPRESS; > } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |