Re: [Xen-devel] [PATCH v13 00/26] COarse-grain LOck-stepping Virtual Machines for Non-stop Service

2016-03-30 Thread Wen Congyang
Yes, it is required for COLO. > > > What is the status of the default ioreq server patch ? Why is it in > your git branch ? I have reported this bug last year: http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02850.html This patch is just a temporary patch. Thanks We

Re: [Xen-devel] [PATCH 0/3] COLO: only build on Linux

2016-04-05 Thread Wen Congyang
I also > have a question why COLO doesn't use libnl? It is using Linux header directly. It is implemented by Yang one year ago. I don't know the reason. We will investigate how to use libnl. Thanks Wen Congyang > > Roger, can you run functional tests on FreeBSD? I don't have

Re: [Xen-devel] [PATCH 0/3] COLO: only build on Linux

2016-04-06 Thread Wen Congyang
On 04/06/2016 06:17 PM, Wei Liu wrote: > On Wed, Apr 06, 2016 at 09:24:26AM +0800, Wen Congyang wrote: >> On 04/06/2016 04:05 AM, Wei Liu wrote: >>> COLO depends on netlink which is only available on Linux. This series >>> cleans up >>> COLO code and make it

Re: [Xen-devel] [PATCH for-4.7] tools/libxl: Fix legacy migration following COLO backchannel breakage

2016-04-14 Thread Wen Congyang
encounter an error as the > legacy stream appears to skip ahead. > > Undo the adjustments to libxl__stream_read_start(), and introduce a > better description of what is going on. Introduce some extra assertions > to try and catch similar breakage in the future. > > Reported-by: Olaf Heri

Re: [Xen-devel] Error migrating VM to secondary host using COLO replication

2016-11-09 Thread Wen Congyang
for the --set-mark argument to have value equal '1' , not a hex? This log is very useful, we will investigate it. Thanks Wen Congyang > > The i got running the command is: > root@colop:~# arptables -I INPUT -i eth1 -j MARK --set-mark 1 > Bad argument `1

Re: [Xen-devel] [PATCH 1/3] Don't create default ioreq server

2016-12-06 Thread Wen Congyang
At 2016/11/30 20:25, Andrew Cooper wrote: On 30/11/16 09:47, Zhang Chen wrote: The ioreq server make colo run failed. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Nack. You can simply "fix" a COLO issue by breaking a much more common usecase. Yes, this patch is wr

Re: [Xen-devel] Error migrating VM to secondary host using COLO replication

2016-11-02 Thread Wen Congyang
>>libxl: error: libxl_qmp.c:702:libxl__qmp_initialize: Connection error: No >>such file or directory >>libxl: error: libxl_colo_restore.c:817:colo_restore_setup_cds_done: COLO: >>failed to setup device >for guest with domid 1 According to the log, we cannot connect to

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-10 Thread Wen Congyang
t;>>>>>> ioreq page contains evtchn which will be set when we resume the >>>>>>>> secondary vm the first time. The hypervisor will check if the >>>>>>>> evtchn is corrupted, so we cannot zero the ioreq page more >>>>>

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-10 Thread Wen Congyang
On 06/10/2015 06:40 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 10 June 2015 10:06 >> To: Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org; Paul Durrant >> Cc: Wei Liu; Ian Campbell; yunho

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-10 Thread Wen Congyang
On 06/10/2015 06:58 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 10 June 2015 11:55 >> To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbell; yunho

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-10 Thread Wen Congyang
On 06/10/2015 07:47 PM, Paul Durrant wrote: >> -Original Message- >> From: xen-devel-boun...@lists.xen.org [mailto:xen-devel- >> boun...@lists.xen.org] On Behalf Of Wen Congyang >> Sent: 10 June 2015 12:38 >> To: Paul Durrant; Andrew Cooper; Yang Hongyang;

Re: [Xen-devel] [PATCH v2 COLOPre 02/13] tools/libxc: support to resume uncooperative HVM guests

2015-06-10 Thread Wen Congyang
On 06/10/2015 11:18 PM, Ian Campbell wrote: > On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> For PVHVM, the hypercall return code is 0, and it can be resumed >> in a new domain context. >> we suspend PVHVM and resume it i

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Wen Congyang
On 06/11/2015 04:32 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 11 June 2015 02:14 >> To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbe

Re: [Xen-devel] [PATCH v2 COLOPre 02/13] tools/libxc: support to resume uncooperative HVM guests

2015-06-11 Thread Wen Congyang
On 06/11/2015 04:44 PM, Ian Campbell wrote: > On Thu, 2015-06-11 at 10:42 +0800, Wen Congyang wrote: >> On 06/10/2015 11:18 PM, Ian Campbell wrote: >>> On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: >>>> From: Wen Congyang >>>> >>>>

Re: [Xen-devel] [PATCH v2 COLOPre 06/13] tools/libxl: Introduce a new internal API libxl__domain_unpause()

2015-06-11 Thread Wen Congyang
On 06/11/2015 04:43 PM, Ian Campbell wrote: > On Thu, 2015-06-11 at 10:21 +0800, Yang Hongyang wrote: >> >> On 06/10/2015 11:37 PM, Ian Campbell wrote: >>> On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: >>>> From: Wen Congyang

Re: [Xen-devel] [PATCH v2 COLOPre 06/13] tools/libxl: Introduce a new internal API libxl__domain_unpause()

2015-06-11 Thread Wen Congyang
On 06/11/2015 05:42 PM, Ian Campbell wrote: > On Thu, 2015-06-11 at 17:09 +0800, Wen Congyang wrote: >> On 06/11/2015 04:43 PM, Ian Campbell wrote: >>> On Thu, 2015-06-11 at 10:21 +0800, Yang Hongyang wrote: >>>> >>>> On 06/10/2015 11:37 PM, Ian Campbel

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Wen Congyang
On 06/11/2015 06:20 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 11 June 2015 09:48 >> To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbe

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Wen Congyang
On 06/11/2015 09:25 PM, Paul Durrant wrote: >> -Original Message- >> From: Yang Hongyang [mailto:yan...@cn.fujitsu.com] >> Sent: 11 June 2015 13:59 >> To: Paul Durrant; Wen Congyang; Andrew Cooper; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbe

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-12 Thread Wen Congyang
On 06/12/2015 03:41 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 12 June 2015 04:22 >> To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbe

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-12 Thread Wen Congyang
On 06/12/2015 06:54 PM, Paul Durrant wrote: >> -Original Message- >> From: Wen Congyang [mailto:we...@cn.fujitsu.com] >> Sent: 12 June 2015 11:26 >> To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen-devel@lists.xen.org >> Cc: Wei Liu; Ian Campbe

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-12 Thread Wen Congyang
At 2015/6/12 19:48, Paul Durrant Wrote: -Original Message- From: Wen Congyang [mailto:we...@cn.fujitsu.com] Sent: 12 June 2015 12:10 To: Paul Durrant; Yang Hongyang; Andrew Cooper; xen-devel@lists.xen.org Cc: Wei Liu; Ian Campbell; guijianf...@cn.fujitsu.com; yunhong.ji...@intel.com

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-12 Thread Wen Congyang
At 2015/6/12 23:31, Paul Durrant Wrote: -Original Message- From: Wen Congyang [mailto:ghost...@gmail.com] Sent: 12 June 2015 16:05 To: Paul Durrant; Wen Congyang; Yang Hongyang; Andrew Cooper; xen- de...@lists.xen.org Cc: Wei Liu; Ian Campbell; guijianf...@cn.fujitsu.com; yunhong.ji

Re: [Xen-devel] [PATCH v2 COLOPre 09/13] tools/libxl: Update libxl_save_msgs_gen.pl to support return data from xl to xc

2015-06-16 Thread Wen Congyang
On 06/16/2015 06:49 PM, Ian Campbell wrote: > On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> Currently, all callbacks return an integer value or void. We cannot >> return some data to xc via callback. Update libxl_save_msgs_gen.

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream

2015-06-16 Thread Wen Congyang
state *stream = CONTAINER_OF(dc, *stream, dc); > +libxl__domain_suspend_state *dss = CONTAINER_OF(stream, *dss, sws); > +STATE_AO_GC(stream->ao); > +int ret = 0; > + > + if (onwrite || errnoval) { > +ret = ERROR_FAIL; > +goto err; > +} > +

Re: [Xen-devel] [PATCH 00/27] Libxl migration v2

2015-06-16 Thread Wen Congyang
> There are some further improvements which could be made. In particular, it > appears that sending the toolstack record on each checkpoint is redundant, and > there is certainly room for some more pruning of the legacy migration code. Do you mean: libxl__toolstack_save is harmles

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream

2015-06-16 Thread Wen Congyang
U_TRADITIONAL; > +break; > + > +case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > +ehdr.id = EMULATOR_QEMU_UPSTREAM; > +break; > + > +default: > +ret = ERROR_FAIL; > +goto err; > +} > + > +ret = libxl__domain_suspen

Re: [Xen-devel] [PATCH 16/27] tools/libxl: Infrastructure for reading a libxl migration v2 stream

2015-06-16 Thread Wen Congyang
ted_len) { > +ret = ERROR_FAIL; > +LOG(ERROR, "write %d, err %d, expected %zu, got %zu", > +onwrite, errnoval, stream->expected_len, dc->used); > +goto err; > +} > + > +hdr->ident = be64toh(hdr->ident)

Re: [Xen-devel] [PATCH 22/27] docs/libxl: [RFC] Introduce CHECKPOINT_END to support migration v2 remus streams

2015-06-16 Thread Wen Congyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: > In a remus senario, libxc will write a CHECKPOINT record, then hand ownership > of the fd to libxl. Libxl then writes any records required and finishes with > a CHECKPOINT_END record, then hands ownership of the fd back to libxc. > > Signed-off-by: A

Re: [Xen-devel] [PATCH 16/27] tools/libxl: Infrastructure for reading a libxl migration v2 stream

2015-06-16 Thread Wen Congyang
c->callback = record_header_done; > + > +ret = libxl__datacopier_start(dc); > +if (ret) > +goto err; > + > +assert(!ret); > +return; > + > + err: > +assert(ret); > +stream_failed(egc, stream, ret); > +} > + > +v

Re: [Xen-devel] [PATCH 25/27] tools/libxl: [RFC] Handle checkpoint records in a libxl migration v2 stream

2015-06-17 Thread Wen Congyang
d_continue(libxl__egc *egc, > stream_failed(egc, stream, ret); > } > > +void libxl__stream_read_start_checkpoint(libxl__egc *egc, > + libxl__stream_read_state *stream) > +{ > +libxl__datacopier_state *dc = &stream->d

Re: [Xen-devel] [PATCH 16/27] tools/libxl: Infrastructure for reading a libxl migration v2 stream

2015-06-17 Thread Wen Congyang
ailed(egc, stream, ret); > +} > + > +static void record_header_done(libxl__egc *egc, > + libxl__datacopier_state *dc, > + int onwrite, int errnoval) > +{ > +libxl__stream_read_state *stream = CONTAINER_OF(dc, *stream, dc); > +

[Xen-devel] building error

2015-06-17 Thread Wen Congyang
^ cc1: all warnings being treated as errors It seems that qemu have some problems. Thanks Wen Congyang ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 16/27] tools/libxl: Infrastructure for reading a libxl migration v2 stream

2015-06-17 Thread Wen Congyang
On 06/17/2015 05:50 PM, Andrew Cooper wrote: > On 17/06/15 08:57, Wen Congyang wrote: >>> +/* Queue up reading the body. */ >>>> +size_t bytes_to_read; >>>> + >>>> +switch (rec_hdr->type) { >>>> +/* >>>&

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream

2015-06-17 Thread Wen Congyang
_write_state *stream, int rc) > +{ > +stream_failed(egc, stream, rc); > +} > + > +static void stream_success(libxl__egc *egc, libxl__stream_write_state > *stream) > +{ > +stream->rc = 0; > +stream->running = false; > + > +stream_done(egc, st

Re: [Xen-devel] [PATCH 16/27] tools/libxl: Infrastructure for reading a libxl migration v2 stream

2015-06-17 Thread Wen Congyang
On 06/17/2015 06:15 PM, Ian Campbell wrote: > On Wed, 2015-06-17 at 11:09 +0800, Wen Congyang wrote: >>> +if (hdr->options & RESTORE_OPT_BIG_ENDIAN) { >>> +ret = ERROR_FAIL; >>> +LOG(ERROR, "Unable to handle big endian streams&quo

Re: [Xen-devel] [PATCH 23/27] tools/libxl: [RFC] Write checkpoint records into the stream

2015-06-17 Thread Wen Congyang
libxl__stream_write_state *stream, int rc) > { > @@ -130,6 +159,7 @@ static void stream_success(libxl__egc *egc, > libxl__stream_write_state *stream) > stream->rc = 0; > stream->running = false; > > +assert(!stream->in_check

Re: [Xen-devel] [PATCH v10 01/31] tools/libxl: introduce libxl__domain_restore_device_model to load qemu state

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:53 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:05AM +0800, Wen Congyang wrote: >> In normal migration, the qemu state is passed to qemu as a parameter. >> With COLO, secondary vm is running. So we will do the following steps >> at every checkpoin

Re: [Xen-devel] [PATCH v10 07/31] docs/libxl: Introduce CHECKPOINT_CONTEXT to support migration v2 colo streams

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:54 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:11AM +0800, Wen Congyang wrote: >> It is the negotiation record for COLO. >> Primary->Secondary: >> control_id 0x: Secondary VM is out of sync, start a new >> ch

Re: [Xen-devel] [PATCH v10 10/31] tools/libxl: add back channel support to write stream

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:54 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:14AM +0800, Wen Congyang wrote: >> Add back channel support to write stream. If the write stream is >> a back channel stream, this means the write stream is used by >> Secondary to send some records back

Re: [Xen-devel] [PATCH v10 12/31] tools/libxl: add back channel support to read stream

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:54 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:16AM +0800, Wen Congyang wrote: >> This is used by primay to read records sent by secondary. >> >> Signed-off-by: Yang Hongyang >> Signed-off-by: Wen Congyang >> --- >> tools/libxl/lib

Re: [Xen-devel] [PATCH v10 16/31] secondary vm suspend/resume/checkpoint code

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:56 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:20AM +0800, Wen Congyang wrote: >> Secondary vm is running in colo mode. So we will do >> the following things again and again: >> 1. Resume secondary vm >>a. Send CHECKPOINT_SVM_READY to master

Re: [Xen-devel] [PATCH v10 17/31] primary vm suspend/resume/checkpoint code

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:57 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:21AM +0800, Wen Congyang wrote: > [...] >> +#include "libxl_osdeps.h" /* must come before any other headers */ >> + >> +#include "libxl_internal.h" >&

Re: [Xen-devel] [PATCH v10 18/31] libxc/restore: support COLO restore

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:57 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:22AM +0800, Wen Congyang wrote: > [...] >> - * With Remus, we buffer the records sent by the primary at checkpoint, >> + * With Remus/COLO, we buffer the records sent by the primary at checkpoint, >>

Re: [Xen-devel] [PATCH v10 21/31] libxc/save: support COLO save

2016-02-25 Thread Wen Congyang
On 02/25/2016 11:58 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:25AM +0800, Wen Congyang wrote: > [...] >> /* >> * Suspend the domain and send dirty memory. >> * This is the last iteration of the live migration and the >> @@ -558,6 +610,16 @@ static int

Re: [Xen-devel] [PATCH v10 16/31] secondary vm suspend/resume/checkpoint code

2016-03-01 Thread Wen Congyang
On 02/25/2016 11:56 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:20AM +0800, Wen Congyang wrote: >> Secondary vm is running in colo mode. So we will do >> the following things again and again: >> 1. Resume secondary vm >>a. Send CHECKPOINT_SVM_READY to master

Re: [Xen-devel] [PATCH v10 10/31] tools/libxl: add back channel support to write stream

2016-03-02 Thread Wen Congyang
On 03/02/2016 11:02 PM, Wei Liu wrote: > On Fri, Feb 26, 2016 at 10:11:27AM +0800, Wen Congyang wrote: >> On 02/25/2016 11:54 PM, Wei Liu wrote: >>> On Mon, Feb 22, 2016 at 10:52:14AM +0800, Wen Congyang wrote: >>>> Add back channel support to write stream. If t

Re: [Xen-devel] [PATCH v10 22/31] implement the cmdline for COLO

2016-03-02 Thread Wen Congyang
On 03/02/2016 11:03 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:26AM +0800, Wen Congyang wrote: > [...] >> +if (libxl_defbool_val(info->colo)) { >> +if (libxl_defbool_val(info->compression)) { > > This can be simplified as > &

Re: [Xen-devel] [PATCH v10 24/31] Support colo mode for qemu disk

2016-03-02 Thread Wen Congyang
On 03/02/2016 11:04 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:28AM +0800, Wen Congyang wrote: >> Usage: disk = >> ['...,colo,colo-host=xxx,colo-port=xxx,colo-export=xxx,active-disk=xxx,hidden-disk=xxx...'] >> For QEMU block replication details: &

Re: [Xen-devel] [PATCH v10 31/31] cmdline switches and config vars to control colo-proxy

2016-03-02 Thread Wen Congyang
On 03/02/2016 11:05 PM, Wei Liu wrote: > On Mon, Feb 22, 2016 at 10:52:35AM +0800, Wen Congyang wrote: >> Add cmdline switches to 'xl migrate-receive' command to specify >> a domain-specific hotplug script to setup COLO proxy. >> >> Add a new config var '

Re: [Xen-devel] Patching error while setting up COLO

2016-03-03 Thread Wen Congyang
On 03/03/2016 05:39 PM, Yu-An(Victor) Chen wrote: > Hi Changlong, > > Thanks for the reply, > > Again when I am trying to do the following: > > 5. build qemu-colo > 1) cd ~/qemu-colo/; *git checkout colo-xen-v2* > * > * > I got this error message *"error: pathspec 'colo-xen-v2' did not match any

Re: [Xen-devel] Patching error while setting up COLO

2016-03-03 Thread Wen Congyang
enable_trace_backend='' ; \ fi ; \ $$source/configure --enable-xen --target-list=i386-softmmu \ $(QEMU_XEN_ENABLE

Re: [Xen-devel] Patching error while setting up COLO

2016-03-06 Thread Wen Congyang
>configure was not able to find it. >Install xen devel > > What do you think what I am missing? Thank you! Do you build xen before? Thanks Wen Congyang > > Victor > > > > On Thu, Mar 3, 2016 at 6:15 PM, Wen Congyang <mailto:we...@cn.fujitsu.com

Re: [Xen-devel] [PATCH v11 20/27] Support colo mode for qemu disk

2016-03-06 Thread Wen Congyang
On 03/05/2016 01:44 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 20/27] Support colo mode for qemu disk"): >> From: Wen Congyang >> >> Usage: disk = >> ['...,colo,colo-host=xxx,colo-port=xxx,colo-export=xxx,active-disk=xxx,hidden-disk=xxx.

Re: [Xen-devel] [PATCH v11 20/27] Support colo mode for qemu disk

2016-03-06 Thread Wen Congyang
backend? I don't know how to work with PV block backend. It is one reason that why we only support pure HVM now. For PV block backend, there is also other problem. For exampe resuming it in the secondary side is very slow, because we need to disconnect and reconnect. Thanks Wen Congyang &g

Re: [Xen-devel] [PATCH v11 10/27] tools/libxl: add back channel support to write stream

2016-03-06 Thread Wen Congyang
On 03/05/2016 01:00 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 10/27] tools/libxl: add back channel > support to write stream"): >> From: Wen Congyang >> >> Add back channel support to write stream. If the write stream is >> a back channe

Re: [Xen-devel] [PATCH v11 12/27] tools/libx{l, c}: introduce wait_checkpoint callback

2016-03-06 Thread Wen Congyang
On 03/05/2016 04:23 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 04, 2016 at 05:03:16PM +, Ian Jackson wrote: >> Changlong Xie writes ("[PATCH v11 12/27] tools/libx{l,c}: introduce >> wait_checkpoint callback"): >>> From: Wen Congyang >>> >&g

Re: [Xen-devel] [PATCH v11 14/27] secondary vm suspend/resume/checkpoint code

2016-03-06 Thread Wen Congyang
On 03/05/2016 01:11 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 14/27] secondary vm > suspend/resume/checkpoint code"): >> From: Wen Congyang >> >> Secondary vm is running in colo mode. So we will do >> the following things again and again

Re: [Xen-devel] [PATCH v11 15/27] primary vm suspend/resume/checkpoint code

2016-03-06 Thread Wen Congyang
On 03/05/2016 01:14 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 15/27] primary vm suspend/resume/checkpoint > code"): >> From: Wen Congyang > > I would look at this on the same basis as the previous patch. > >> diff --git a/tools

Re: [Xen-devel] [PATCH v11 17/27] libxc/save: support COLO save

2016-03-06 Thread Wen Congyang
On 03/05/2016 01:18 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 17/27] libxc/save: support COLO save"): >> From: Wen Congyang >> >> After suspend primary vm, get dirty bitmap on secondary vm, >> and send pages both dirty on primary/secondar

Re: [Xen-devel] [PATCH v11 18/27] implement the cmdline for COLO

2016-03-06 Thread Wen Congyang
TREAM_COLO; >> +else >> +dss->checkpointed_stream = LIBXL_CHECKPOINTED_STREAM_REMUS; > > If you prefer, a ? : expression would do here as well. > > +dss->checkpointed_stream = >libxl_defbool_val() ? LIBXL_CHECKPOINTED_STREAM_COLO :.

[Xen-devel] [PATCH] libxc: move migration_stream's definition to xenguest.h

2016-03-07 Thread Wen Congyang
xc_save_domain()'s parameter use this type, so it should be public. Signed-off-by: Wen Congyang --- tools/libxc/include/xenguest.h | 10 ++ tools/libxc/xc_sr_common.h | 10 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/libxc/include/xengues

Re: [Xen-devel] [PATCH] libxc: move migration_stream's definition to xenguest.h

2016-03-08 Thread Wen Congyang
On 03/08/2016 06:38 PM, Andrew Cooper wrote: > On 08/03/16 05:32, Wen Congyang wrote: >> xc_save_domain()'s parameter use this type, so it should >> be public. > > xc_domain_save() currently uses an int, which also needs fixing. OK. Will fix it in the next version. &

[Xen-devel] [PATCH v2 2/2] tools: change checkpointed_stream's type from int to xc_migration_stream_t

2016-03-09 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxc/include/xenguest.h | 4 ++-- tools/libxc/xc_nomigrate.c | 4 ++-- tools/libxc/xc_sr_restore.c | 2 +- tools/libxc/xc_sr_save.c| 2 +- tools/libxl/libxl_save_helper.c | 38 +++--- 5 files changed, 25

[Xen-devel] [PATCH v2 1/2] libxc: move migration_stream's definition to xenguest.h

2016-03-09 Thread Wen Congyang
xc_domain_save() and xc_domain_restore's parameter will use this type, so it should be public. Signed-off-by: Wen Congyang --- tools/libxc/include/xenguest.h | 5 + tools/libxc/xc_sr_common.h | 10 -- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/

[Xen-devel] [PATCH v3 3/3] libxl: rename checkpointed_stream to stream_type

2016-03-10 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl.h | 8 tools/libxl/libxl_create.c | 4 ++-- tools/libxl/libxl_dom_save.c | 6 +++--- tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_save_callout.c | 4

[Xen-devel] [PATCH v3 2/3] tools: change checkpointed_stream's type from int to xc_migration_stream_t

2016-03-10 Thread Wen Congyang
checkpointed_stream is also renamed to stream_type Signed-off-by: Wen Congyang --- v2->v3: Rename checkpointed_stream to stream_type tools/libxc/include/xenguest.h | 8 tools/libxc/xc_nomigrate.c | 4 ++-- tools/libxc/xc_sr_restore.c | 10 +- tools/li

[Xen-devel] [PATCH v3 1/3] libxc: move migration_stream's definition to xenguest.h

2016-03-10 Thread Wen Congyang
xc_domain_save() and xc_domain_restore's parameter will use this type, so it should be public. Signed-off-by: Wen Congyang --- v2->v3: Rename MIG_STREAM_* to XC_MIG_STREAM_* tools/libxc/include/xenguest.h | 7 ++- tools/libxc/xc_sr_common.h | 10 -- tools/libxc/xc_s

Re: [Xen-devel] [PATCH v11 07/27] docs/libxl: Introduce CHECKPOINT_CONTEXT to support migration v2 colo streams

2016-03-10 Thread Wen Congyang
On 03/05/2016 12:51 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 07/27] docs/libxl: Introduce > CHECKPOINT_CONTEXT to support migration v2 colo streams"): >> From: Wen Congyang > > I think we will want to see an ack from Andy Cooper on this, in d

Re: [Xen-devel] [PATCH v11 10/27] tools/libxl: add back channel support to write stream

2016-03-11 Thread Wen Congyang
On 03/05/2016 01:00 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 10/27] tools/libxl: add back channel > support to write stream"): >> From: Wen Congyang >> >> Add back channel support to write stream. If the write stream is >> a back channe

Re: [Xen-devel] [PATCH v10 26/31] COLO proxy: implement setup/teardown of COLO proxy module

2016-03-14 Thread Wen Congyang
v)); >> +} >> +return ret; >> +} >> + >> +/* = colo-proxy: setup and teardown == */ >> + >> +int colo_proxy_setup(libxl__colo_proxy_state *cps) >> +{ >> +int skfd = 0; >> +struct sockaddr_nl sa; >>

[Xen-devel] [PATCH v4 3/3] libxl: rename checkpointed_stream to stream_type

2016-03-14 Thread Wen Congyang
Signed-off-by: Wen Congyang --- v3->v4: Remove the new macro, and updte the macro LIBXL_HAVE_CHECKPOINTED_STREAM tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl.h | 4 +++- tools/libxl/libxl_create.c | 4 ++-- tools/libxl/libxl_dom_save.c | 6 +++--- to

[Xen-devel] [PATCH v4 1/3] libxc: move migration_stream's definition to xenguest.h

2016-03-14 Thread Wen Congyang
xc_domain_save() and xc_domain_restore's parameter will use this type, so it should be public. Signed-off-by: Wen Congyang Acked-by: Wei Liu --- v2->v3: Rename MIG_STREAM_* to XC_MIG_STREAM_* tools/libxc/include/xenguest.h | 7 ++- tools/libxc/xc_sr_common.h | 10 -

[Xen-devel] [PATCH v4 2/3] tools: change checkpointed_stream's type from int to xc_migration_stream_t

2016-03-14 Thread Wen Congyang
checkpointed_stream is also renamed to stream_type Signed-off-by: Wen Congyang Acked-by: Wei Liu --- v2->v3: Rename checkpointed_stream to stream_type tools/libxc/include/xenguest.h | 8 tools/libxc/xc_nomigrate.c | 4 ++-- tools/libxc/xc_sr_restore.c |

Re: [Xen-devel] [PATCH v4 3/3] libxl: rename checkpointed_stream to stream_type

2016-03-15 Thread Wen Congyang
On 03/15/2016 08:54 PM, Wei Liu wrote: > On Tue, Mar 15, 2016 at 09:58:37AM +0800, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> --- >> v3->v4: Remove the new macro, and updte the macro >> LIBXL_HAVE_CHECKPOINTED_STREAM >> tools/libxl/libxl.c

Re: [Xen-devel] [PATCH v11 20/27] Support colo mode for qemu disk

2016-03-19 Thread Wen Congyang
On 03/18/2016 01:18 AM, Ian Jackson wrote: > Wen Congyang writes ("Re: [PATCH v11 20/27] Support colo mode for qemu disk"): >> How does block replication work: > > Thanks for this explanation, which is reallt helpful. > > I would like to repeat back to you

Re: [Xen-devel] [PATCH 12/35] libxl: events: Make timeout and async exec setup take an ao, not a gc

2015-06-29 Thread Wen Congyang
just reviewed this patch, and don't do a building test. libxl__async_exec_start() is also used in libxl_netbuffer.c. Thanks Wen Congyang > > Signed-off-by: Ian Jackson > CC: Yang Hongyang > CC: Wen Congyang > CC: Lai Jiangshan > Acked-by: Wen Congyang > Acked-by: Ian Campbell

[Xen-devel] fix building error

2015-06-29 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxl/libxl_netbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_netbuffer.c b/tools/libxl/libxl_netbuffer.c index ff2d6c7..107e867 100644 --- a/tools/libxl/libxl_netbuffer.c +++ b/tools/libxl

Re: [Xen-devel] fix building error

2015-06-30 Thread Wen Congyang
On 06/30/2015 04:26 PM, Ian Campbell wrote: > On Tue, 2015-06-30 at 14:10 +0800, Wen Congyang wrote: > > It would be usual do describe here which commit caused the breakage > (i.e. removed the parameter). Also please make the subject something > more descriptive such as "remov

[Xen-devel] [PATCH v2] remove now unnecessary gc from libxl__async_exec_start calls

2015-06-30 Thread Wen Congyang
These were removed in commit f5f8400f. Signed-off-by: Wen Congyang --- tools/libxl/libxl_netbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_netbuffer.c b/tools/libxl/libxl_netbuffer.c index ff2d6c7..107e867 100644 --- a/tools/libxl

Re: [Xen-devel] [PATCH v3 COLOPre 08/26] tools/libxc: support to resume uncooperative HVM guests

2015-06-30 Thread Wen Congyang
On 06/30/2015 12:27 AM, Ian Campbell wrote: > On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> 1. suspend >> a. PVHVM and PV: we use the same way to suspend the guest(send the suspend > > space between "guest" and th

Re: [Xen-devel] [PATCH v3 COLOPre 21/26] tools/libxl: refactor write stream to support back channel

2015-06-30 Thread Wen Congyang
On 06/30/2015 06:28 PM, Ian Campbell wrote: > On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote: >> From: Wen Congyang > > Refactor how? > > (Tip: In general no change can be sufficiently described in just the > subject line unless it is absolutely the most trivia

Re: [Xen-devel] [PATCH v3 COLOPre 21/26] tools/libxl: refactor write stream to support back channel

2015-07-01 Thread Wen Congyang
On 07/01/2015 06:45 PM, Ian Campbell wrote: > On Wed, 2015-07-01 at 13:33 +0800, Wen Congyang wrote: >> On 06/30/2015 06:28 PM, Ian Campbell wrote: >>> On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote: >>>> From: Wen Congyang >>> >>> Refacto

Re: [Xen-devel] [PATCH v1 COLO Pre 04/12] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-02 Thread Wen Congyang
tate each time in step2, and > slave's qemu should read it each time before resuming > secondary vm. Introduce a new API libxl__domain_restore() > to do it. This API should be called before resuming > secondary vm. > > Signed-off-by: Yang Hongyang > Signed-off-by: Wen Congya

Re: [Xen-devel] [PATCH v1 COLO Pre 02/12] libxc/restore: zero ioreq page only one time

2015-06-02 Thread Wen Congyang
more >> than one time. >> >> The ioreq->state is always STATE_IOREQ_NONE after the vm is >> suspended, so it is OK if we only zero it one time. >> >> Signed-off-by: Yang Hongyang >> Signed-off-by: Wen congyang >> CC: Andrew Cooper > > Is th

Re: [Xen-devel] [PATCH v7 12/18] tools/libx{l, c}: add back channel to libxc

2016-01-31 Thread Wen Congyang
On 01/30/2016 12:38 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 29, 2016 at 01:27:28PM +0800, Wen Congyang wrote: >> In COLO mode, both VMs are running, and are considered in sync if the >> visible network traffic is identical. After some time, they fall out of >> sync

Re: [Xen-devel] [PATCH v7 01/18] libxl/remus: init checkpoint_callback in Remus setup callback

2016-02-03 Thread Wen Congyang
On 02/04/2016 03:39 AM, Wei Liu wrote: > On Fri, Jan 29, 2016 at 01:27:17PM +0800, Wen Congyang wrote: >> init stream {read/write} state checkpoint_callback in Remus setup callback. >> There's no functional change, it's just refactoring so that we can move >&g

Re: [Xen-devel] [PATCH v7 07/18] migration/save: pass checkpointed_stream from libxl to libxc

2016-02-03 Thread Wen Congyang
On 02/04/2016 03:40 AM, Wei Liu wrote: > On Fri, Jan 29, 2016 at 01:27:23PM +0800, Wen Congyang wrote: >> Pass checkpointed_stream from libxl to libxc. >> It won't affact legacy migration because legacy migration >> won't use this param. >> >> Signed-o

Re: [Xen-devel] [PATCH v7 08/18] tools/libxl: introduce libxl__domain_restore_device_model to load qemu state

2016-02-03 Thread Wen Congyang
On 02/04/2016 03:40 AM, Wei Liu wrote: > On Fri, Jan 29, 2016 at 01:27:24PM +0800, Wen Congyang wrote: >> In normal migration, the qemu state is passed to qemu as a parameter. >> With COLO, secondary vm is running. So we will do the following steps >> at every checkpoin

Re: [Xen-devel] [PATCH v7 12/18] tools/libx{l, c}: add back channel to libxc

2016-02-03 Thread Wen Congyang
On 02/04/2016 03:40 AM, Wei Liu wrote: > On Fri, Jan 29, 2016 at 01:27:28PM +0800, Wen Congyang wrote: >> In COLO mode, both VMs are running, and are considered in sync if the >> visible network traffic is identical. After some time, they fall out of >> sync. >> >>

Re: [Xen-devel] [PATCH v7 05/18] tools/libxc: support to resume uncooperative HVM guests

2016-02-03 Thread Wen Congyang
On 02/04/2016 03:40 AM, Wei Liu wrote: > On Fri, Jan 29, 2016 at 01:27:21PM +0800, Wen Congyang wrote: >> Before this patch: >> 1. suspend >> a. PVHVM and PV: we use the same way to suspend the guest (send the suspend >>request to the guest). If the guest doesn

[Xen-devel] [PATCH v8 11/13] tools/libxl: store remus_ops in checkpoint device state

2016-02-17 Thread Wen Congyang
checkpoint device layer will seperate remus from checkpoint device layer. We use remus ops directly in checkpoint device. Store it in checkpoint device state so that we do not aware of remus_ops in the checkpoint device layer. It is pure refactoring and no functional changes. Signed-off-by: Wen Congyang

[Xen-devel] [PATCH v8 09/13] tools/libxl: rename remus device to checkpoint device

2016-02-17 Thread Wen Congyang
device_(/g' tools/libxl/libxl_internal.h The patch also fixes the following backword compatibility: The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and changed to ERROR_CHECKPOINT_XXX after previous renaming. Signed-off-by: Wen Congyang Signed-o

[Xen-devel] [PATCH v8 05/13] tools/libxc: support to resume uncooperative HVM guests

2016-02-17 Thread Wen Congyang
low path to resume the guest. While resuming HVM using slow path is not supported currently, this patch is to make the resume call to not fail. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang Reviewed-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_resume.c | 25 +

[Xen-devel] [PATCH v8 01/13] libxl/remus: init checkpoint callback in Remus setup callback

2016-02-17 Thread Wen Congyang
Init stream {read/write} state checkpoint_callback, suspend/resume/checkpoint callback in Remus setup callback. There's no functional change, it's just refactoring so that we can move all remus code into one file. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew

[Xen-devel] [PATCH v8 07/13] migration/save: pass checkpointed_stream from libxl to libxc

2016-02-17 Thread Wen Congyang
Pass checkpointed_stream from libxl to libxc. It won't affact legacy migration because legacy migration won't use this param. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper Reviewed-by: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v8 00/13] Prerequisite patches for COLO

2016-02-17 Thread Wen Congyang
eckpoint callback - Introduce DIRTY_BITMAP record on libxc side - Introduce COLO_CONTEXT record on libxl side - Ported to Libxl migration v2 v1->v2: - Rebased to [PATCH v2 0/6] Misc cleanups for libxl - Add a bugfix for the error handling of process_record Wen Congyang (13): libxl/remus:

[Xen-devel] [PATCH v8 03/13] tools/libxl: move save/restore code into libxl_dom_save.c

2016-02-17 Thread Wen Congyang
This is purely code motion. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Ian Jackson Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- tools/libxl/Makefile | 2 +- tools/libxl/libxl_dom.c | 509

[Xen-devel] [PATCH v8 02/13] tools/libxl: move remus code into libxl_remus.c

2016-02-17 Thread Wen Congyang
: Wen Congyang CC: Ian Campbell CC: Ian Jackson Acked-by:Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- tools/libxl/Makefile | 2 +- tools/libxl/libxl.c | 75 - tools/libxl/libxl_create.c | 32 tools/libxl/libxl_dom.c | 223

[Xen-devel] [PATCH v8 10/13] tools/libxl: adjust the indentation

2016-02-17 Thread Wen Congyang
This is just tidying up after the "tools/libxl: rename remus device to checkpoint device" patch automatic renaming. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- tools/libxl/libxl_checkpoin

[Xen-devel] [PATCH v8 13/13] tools/libxl: seperate device init/cleanup from checkpoint device layer

2016-02-17 Thread Wen Congyang
. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- tools/libxl/libxl_checkpoint_device.c | 42 ++- tools/libxl/libxl_remus.c | 42

  1   2   3   4   >