[Qemu-devel] [PATCH V9 07/20] COLO: Load dirty pages into SVM's RAM cache firstly

2018-06-27 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen --- include/exec/ram_addr.h | 1 + migration/migration.c | 6 +++ migration/ram.c | 83 - migration/ram.h | 4 ++ migration/savevm.c | 2 +- 5 files changed, 93

[Qemu-devel] [PATCH V9 17/20] filter-rewriter: handle checkpoint and failover event

2018-06-27 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen --- net/colo-compare.c| 12 - net/colo.c| 8 ++ net/colo.h| 2 ++ net/filter-rewriter.c | 57 +++ 4 files changed, 73 insertions(+), 6 deletions(-) diff --git a/net/colo

[Qemu-devel] [PATCH V9 06/20] COLO: Remove colo_state migration struct

2018-06-27 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- include/migration/colo.h | 5 +-- migration/Makefile.objs | 2 +- migration/colo-comm.c| 76 migration/colo.c | 13 ++- migration/migration.c| 23

[Qemu-devel] [PATCH V9 16/20] filter: Add handle_event method for NetFilterClass

2018-06-27 Thread Zhang Chen
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c| 28 3 files changed, 50 insertions(+)

[Qemu-devel] [PATCH V9 11/20] qapi/migration.json: Rename COLO unknown mode to none mode.

2018-06-27 Thread Zhang Chen
From: Zhang Chen Suggested by Markus Armbruster rename COLO unknown mode to none mode. Signed-off-by: Zhang Chen --- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- qapi/migration.json | 10 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH V9 18/20] COLO: notify net filters about checkpoint/failover event

2018-06-27 Thread Zhang Chen
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index

[Qemu-devel] [PATCH V9 04/20] COLO: integrate colo compare with colo frame

2018-06-27 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 42 -- migration/migration.c | 6 ++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index

[Qemu-devel] [PATCH V9 10/20] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-06-27 Thread Zhang Chen
necessary to notify users that we exited COLO mode. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- migration/colo.c| 31 +++ qapi/migration.json | 38

[Qemu-devel] [PATCH V9 09/20] COLO: Flush memory data from ram cache

2018-06-27 Thread Zhang Chen
During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all content of PVM's RAM

[Qemu-devel] [PATCH V9 08/20] ram/COLO: Record the dirty pages that SVM received

2018-06-27 Thread Zhang Chen
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we can record both

[Qemu-devel] [PATCH V9 13/20] savevm: split the process of different stages for loadvm/savevm

2018-06-27 Thread Zhang Chen
() and qemu_save_device_state() public, and simplify the codes of qemu_save_device_state() by calling the wrapper qemu_savevm_state_header(). Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 41

[Qemu-devel] [PATCH V9 02/20] colo-compare: implement the process of checkpoint

2018-06-27 Thread Zhang Chen
While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do this process, which runs inside of compare threads as a coroutine. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen --- include

[Qemu-devel] [PATCH V9 05/20] COLO: Add block replication into colo process

2018-06-27 Thread Zhang Chen
Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen --- migration/colo.c | 43

[Qemu-devel] [PATCH V9 03/20] colo-compare: use notifier to notify packets comparing result

2018-06-27 Thread Zhang Chen
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang --- net/colo-compare.c | 37 ++--- net/colo-compare.h | 2 ++ 2 files changed, 28 insertions(+), 11 deletions

[Qemu-devel] [PATCH V9 01/20] filter-rewriter: Add TCP state machine and fix memory leak in connection_track_table

2018-06-27 Thread Zhang Chen
, if it is closed, its related resources will be cleared up. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen --- net/colo.c| 2 +- net/colo.h| 9 ++-- net/filter-rewriter.c | 105 ++ 3 files changed, 100 insertions(+), 16

[Qemu-devel] [PATCH V9 00/20] COLO: integrate colo frame with block replication and COLO proxy

2018-06-27 Thread Zhang Chen
status COLO vm crash with segmentation fault. V7: - Addressed Markus's comments in 11/17. - Rebased on upstream. V6: - Addressed Eric Blake's comments, use the enum to feedback in patch 11/17. - Fixed QAPI command separator problem in patch 11/17. Zhang Chen (16): filter-rewriter: Add TCP state ma

Re: [Qemu-devel] [PATCH V7 RESEND 12/17] savevm: split the process of different stages for loadvm/savevm

2018-06-21 Thread Zhang Chen
On Wed, Jun 20, 2018 at 3:00 AM, Dr. David Alan Gilbert wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > On Wed, May 16, 2018 at 2:56 AM, Dr. David Alan Gilbert < > dgilb...@redhat.com > > > wrote: > > > > > * Zhang Chen (zhangc...@gmail.

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-18 Thread Zhang Chen
On Thu, Jun 14, 2018 at 5:25 PM, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: > > "Dr. David Alan Gilbert" writes: > > > > > * Zhang Chen (zhangc...@gmail.com) wrote: > > >> On Mon, Jun 11, 2018

Re: [Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-11 Thread Zhang Chen
On Mon, Jun 11, 2018 at 3:02 PM, Jason Wang wrote: > > > On 2018年06月11日 14:46, Zhang Chen wrote: > >> On Mon, Jun 11, 2018 at 9:56 AM, Jason Wang wrote: >> >> >>> On 2018年06月10日 22:09, Zhang Chen wrote: >>> >>> I think

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-11 Thread Zhang Chen
On Mon, Jun 11, 2018 at 2:48 PM, Markus Armbruster wrote: > Zhang Chen writes: > > > On Thu, Jun 7, 2018 at 8:59 PM, Markus Armbruster > wrote: > > > >> Zhang Chen writes: > >> > >> > Libvirt or other high level software can use this

Re: [Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-11 Thread Zhang Chen
On Mon, Jun 11, 2018 at 9:56 AM, Jason Wang wrote: > > > On 2018年06月10日 22:09, Zhang Chen wrote: > >> I think when COLO is enabled, qemu should reject all other types of >>> backends. >>> >> Yes, you are right. >> May be we should add a assert h

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Mon, Jun 11, 2018 at 1:42 AM, Zhang Chen wrote: > > > On Tue, Jun 5, 2018 at 6:23 AM, Eric Blake wrote: > >> On 06/03/2018 12:05 AM, Zhang Chen wrote: >> >>> Libvirt or other high level software can use this command query colo >>>

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Tue, Jun 5, 2018 at 6:23 AM, Eric Blake wrote: > On 06/03/2018 12:05 AM, Zhang Chen wrote: > >> Libvirt or other high level software can use this command query colo >> status. >> You can test this command like that: >> {'execute':'query-colo-status'} &

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Thu, Jun 7, 2018 at 8:59 PM, Markus Armbruster wrote: > Zhang Chen writes: > > > Libvirt or other high level software can use this command query colo > status. > > You can test this command like that: > > {'execute':'query-colo-status'} > &

Re: [Qemu-devel] [PATCH V8 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-06-10 Thread Zhang Chen
On Thu, Jun 7, 2018 at 8:54 PM, Markus Armbruster wrote: > Eric Blake writes: > > > On 06/03/2018 12:05 AM, Zhang Chen wrote: > >> From: zhanghailiang > >> > >> If some errors happen during VM's COLO FT stage, it's important to > >> notify the

Re: [Qemu-devel] [PATCH V8 15/17] filter-rewriter: handle checkpoint and failover event

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 3:42 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> After one round of checkpoint, the states between PVM and SVM >> become consistent, so it is unnecessary to adjust the sequence >> of net packets for old connec

Re: [Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:57 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> Filter needs to process the event of checkpoint/failover or >> other event passed by COLO frame. >> >> Signed-off-by: zhanghailiang >> --- >> i

Re: [Qemu-devel] [PATCH V8 03/17] colo-compare: use notifier to notify packets comparing result

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:36 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> It's a good idea to use notifier to notify COLO frame of >> inconsistent packets comparing. >> >> Signed-off-by: Zhang Chen >> Signed-off-by: zhanghai

Re: [Qemu-devel] [PATCH V8 02/17] colo-compare: implement the process of checkpoint

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:31 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> While do checkpoint, we need to flush all the unhandled packets, >> By using the filter notifier mechanism, we can easily to notify >> every compare object to do t

Re: [Qemu-devel] [PATCH V8 01/17] filter-rewriter: fix memory leak for connection in connection_track_table

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 1:51 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> After a net connection is closed, we didn't clear its releated resources >> in connection_track_table, which will lead to memory leak. >> >> Let

[Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-06-03 Thread Zhang Chen
Hi Suiheng, This bug have been fixed in my latest patch. Please retest it. https://www.mail-archive.com/qemu-devel@nongnu.org/msg538383.html github: https://github.com/zhangckid/qemu/tree/qemu-colo-18jun1 Thanks Zhang Chen -- You received this bug notification because you are a member of qemu

[Qemu-devel] [PATCH V8 15/17] filter-rewriter: handle checkpoint and failover event

2018-06-02 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen --- migration/colo.c | 13 + net/filter-rewriter.c | 40 2 files changed, 53 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 442471e088..0bff21d9e5 100644 --- a/migration/colo.c

[Qemu-devel] [PATCH V8 12/17] savevm: split the process of different stages for loadvm/savevm

2018-06-02 Thread Zhang Chen
() and qemu_save_device_state() public, and simplify the codes of qemu_save_device_state() by calling the wrapper qemu_savevm_state_header(). Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 40

[Qemu-devel] [PATCH V8 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-06-02 Thread Zhang Chen
necessary to notify users that we exited COLO mode. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Reviewed-by: Eric Blake --- migration/colo.c| 31 +++ qapi/migration.json | 38 ++ 2 files changed

[Qemu-devel] [PATCH V8 16/17] COLO: notify net filters about checkpoint/failover event

2018-06-02 Thread Zhang Chen
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index

[Qemu-devel] [PATCH V8 08/17] ram/COLO: Record the dirty pages that SVM received

2018-06-02 Thread Zhang Chen
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we can record both

[Qemu-devel] [PATCH V8 07/17] COLO: Load dirty pages into SVM's RAM cache firstly

2018-06-02 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen --- include/exec/ram_addr.h | 1 + migration/migration.c | 6 +++ migration/ram.c | 83 - migration/ram.h | 4 ++ migration/savevm.c | 2 +- 5 files changed, 93

Re: [Qemu-devel] [PATCH V7 RESEND 12/17] savevm: split the process of different stages for loadvm/savevm

2018-06-02 Thread Zhang Chen
On Wed, May 16, 2018 at 2:56 AM, Dr. David Alan Gilbert wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > From: zhanghailiang > > > > There are several stages during loadvm/savevm process. In different > stage, > > migration incoming processes different

[Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-02 Thread Zhang Chen
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c| 28 3 files changed, 50 insertions(+)

[Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-02 Thread Zhang Chen
Libvirt or other high level software can use this command query colo status. You can test this command like that: {'execute':'query-colo-status'} Signed-off-by: Zhang Chen --- migration/colo.c| 39 +++ qapi/migration.json | 34

[Qemu-devel] [PATCH V8 17/17] COLO: quick failover process by kick COLO thread

2018-06-02 Thread Zhang Chen
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 8 1 file changed, 8 insertions(+)

[Qemu-devel] [PATCH V8 03/17] colo-compare: use notifier to notify packets comparing result

2018-06-02 Thread Zhang Chen
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang --- net/colo-compare.c | 32 +--- net/colo-compare.h | 2 ++ 2 files changed, 27 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH V8 13/17] COLO: flush host dirty ram from cache

2018-06-02 Thread Zhang Chen
From: zhanghailiang Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 10 ++ 1 file changed, 10

[Qemu-devel] [PATCH V8 09/17] COLO: Flush memory data from ram cache

2018-06-02 Thread Zhang Chen
During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all content of PVM's RAM

[Qemu-devel] [PATCH V8 02/17] colo-compare: implement the process of checkpoint

2018-06-02 Thread Zhang Chen
While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do this process, which runs inside of compare threads as a coroutine. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen --- include

[Qemu-devel] [PATCH V8 05/17] COLO: Add block replication into colo process

2018-06-02 Thread Zhang Chen
Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen --- migration/colo.c | 43

[Qemu-devel] [PATCH V8 01/17] filter-rewriter: fix memory leak for connection in connection_track_table

2018-06-02 Thread Zhang Chen
After a net connection is closed, we didn't clear its releated resources in connection_track_table, which will lead to memory leak. Let't track the state of net connection, if it is closed, its related resources will be cleared up. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen

[Qemu-devel] [PATCH V8 04/17] COLO: integrate colo compare with colo frame

2018-06-02 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 42 -- migration/migration.c | 6 ++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index

[Qemu-devel] [PATCH V8 06/17] COLO: Remove colo_state migration struct

2018-06-02 Thread Zhang Chen
-by: zhanghailiang Signed-off-by: Zhang Chen Reviewed-by: Dr. David Alan Gilbert --- include/migration/colo.h | 5 +-- migration/Makefile.objs | 2 +- migration/colo-comm.c| 76 migration/colo.c | 13 ++- migration/migration.c| 23

[Qemu-devel] [PATCH V8 00/17] COLO: integrate colo frame with block replication and COLO proxy

2018-06-02 Thread Zhang Chen
mentation fault. V7: - Addressed Markus's comments in 11/17. - Rebased on upstream. V6: - Addressed Eric Blake's comments, use the enum to feedback in patch 11/17. - Fixed QAPI command separator problem in patch 11/17. Zhang Chen (13): filter-rewriter: fix memory

Re: [Qemu-devel] [PATCH V7 RESEND 07/17] COLO: Load dirty pages into SVM's RAM cache firstly

2018-05-20 Thread Zhang Chen
On Wed, May 16, 2018 at 12:55 AM, Dr. David Alan Gilbert < dgilb...@redhat.com> wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > We should not load PVM's state directly into SVM, because there maybe > some > > errors happen when SVM is receving data, which will br

Re: [Qemu-devel] [PATCH V7 RESEND 09/17] COLO: Flush memory data from ram cache

2018-05-20 Thread Zhang Chen
On Tue, May 15, 2018 at 10:44 PM, Dr. David Alan Gilbert < dgilb...@redhat.com> wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > During the time of VM's running, PVM may dirty some pages, we will > transfer > > PVM's dirty pages to SVM and store them into

Re: [Qemu-devel] [PATCH V7 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-05-20 Thread Zhang Chen
On Thu, May 17, 2018 at 4:19 PM, Markus Armbruster <arm...@redhat.com> wrote: > Zhang Chen <zhangc...@gmail.com> writes: > > > On Tue, May 15, 2018 at 10:29 PM, Markus Armbruster <arm...@redhat.com> > > wrote: > > > >> Zhang Chen <zhangc

Re: [Qemu-devel] [PATCH V7 RESEND 06/17] COLO: Remove colo_state migration struct

2018-05-16 Thread Zhang Chen
On Wed, May 16, 2018 at 12:02 AM, Dr. David Alan Gilbert < dgilb...@redhat.com> wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > We need to know if migration is going into COLO state for > > incoming side before start normal migration. > > > > Instead by usi

Re: [Qemu-devel] [PATCH V7 RESEND 04/17] COLO: integrate colo compare with colo frame

2018-05-16 Thread Zhang Chen
On Wed, May 16, 2018 at 7:12 PM, Dr. David Alan Gilbert <dgilb...@redhat.com > wrote: > * Zhang Chen (zhangc...@gmail.com) wrote: > > For COLO FT, both the PVM and SVM run at the same time, > > only sync the state while it needs. > > > > So here, let SVM runs w

Re: [Qemu-devel] [PATCH V7 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-05-16 Thread Zhang Chen
On Tue, May 15, 2018 at 10:29 PM, Markus Armbruster <arm...@redhat.com> wrote: > Zhang Chen <zhangc...@gmail.com> writes: > > > From: zhanghailiang <zhang.zhanghaili...@huawei.com> > > > > If some errors happen during VM's COLO FT stage, it's impor

Re: [Qemu-devel] [PATCH V7 11/17] qapi: Add new command to query colo status

2018-05-16 Thread Zhang Chen
On Tue, May 15, 2018 at 10:26 PM, Markus Armbruster <arm...@redhat.com> wrote: > Zhang Chen <zhangc...@gmail.com> writes: > > > Libvirt or other high level software can use this command query colo > status. > > You can test this command like that:

[Qemu-devel] [PATCH V7 RESEND 11/17] qapi: Add new command to query colo status

2018-05-14 Thread Zhang Chen
Libvirt or other high level software can use this command query colo status. You can test this command like that: {'execute':'query-colo-status'} Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- migration/colo.c| 34 ++ qapi/migration.jso

[Qemu-devel] [PATCH V7 RESEND 08/17] ram/COLO: Record the dirty pages that SVM received

2018-05-14 Thread Zhang Chen
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we can record both

[Qemu-devel] [PATCH V7 RESEND 16/17] COLO: notify net filters about checkpoint/failover event

2018-05-14 Thread Zhang Chen
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Signed-off-by: zhanghailiang --- migration/colo.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/colo.c

[Qemu-devel] [PATCH V7 RESEND 15/17] filter-rewriter: handle checkpoint and failover event

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- migration/colo.c | 13 + net/filter-rewriter.c | 40 2 files changed, 53 insertions(+) diff --git a/migration/colo.c b/migration/

[Qemu-devel] [PATCH V7 RESEND 17/17] COLO: quick failover process by kick COLO thread

2018-05-14 Thread Zhang Chen
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang --- migration/colo.c | 8 1 file

[Qemu-devel] [PATCH V7 RESEND 06/17] COLO: Remove colo_state migration struct

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/migration/colo.h | 5 +-- migration/Makefile.objs | 2 +- migration/colo-comm.c| 76 migration/colo.c | 13 ++- migration/migrati

[Qemu-devel] [PATCH V7 RESEND 13/17] COLO: flush host dirty ram from cache

2018-05-14 Thread Zhang Chen
From: zhanghailiang <zhang.zhanghaili...@huawei.com> Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH V7 RESEND 14/17] filter: Add handle_event method for NetFilterClass

2018-05-14 Thread Zhang Chen
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c| 28 3

[Qemu-devel] [PATCH V7 RESEND 05/17] COLO: Add block replication into colo process

2018-05-14 Thread Zhang Chen
Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by

[Qemu-devel] [PATCH V7 RESEND 12/17] savevm: split the process of different stages for loadvm/savevm

2018-05-14 Thread Zhang Chen
com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- migration/colo.c | 36 migration/savevm.c | 35 --- migration/savevm.h | 4 3 files changed,

[Qemu-devel] [PATCH V7 RESEND 04/17] COLO: integrate colo compare with colo frame

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- migration/colo.c | 42 -- migration/migration.c | 4 ++-- 2 files chan

[Qemu-devel] [PATCH V7 RESEND 09/17] COLO: Flush memory data from ram cache

2018-05-14 Thread Zhang Chen
During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all content of PVM's RAM

[Qemu-devel] [PATCH V7 RESEND 00/17] COLO: integrate colo frame with block replication and COLO proxy

2018-05-14 Thread Zhang Chen
comments, use the enum to feedback in patch 11/17. - Fixed QAPI command separator problem in patch 11/17. Zhang Chen (12): filter-rewriter: fix memory leak for connection in connection_track_table colo-compare: implement the process of checkpoint colo-compare: use notifier to notify packets

[Qemu-devel] [PATCH V7 RESEND 03/17] colo-compare: use notifier to notify packets comparing result

2018-05-14 Thread Zhang Chen
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by: Zhang Chen <zhangc...@gmail.com> Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> --- net/colo-compare.c | 32 +--- net/colo-compare.h | 2

[Qemu-devel] [PATCH V7 RESEND 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-05-14 Thread Zhang Chen
COLO's failover verdict, it is still necessary to notify users that we exited COLO mode. Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Eric

[Qemu-devel] [PATCH V7 RESEND 02/17] colo-compare: implement the process of checkpoint

2018-05-14 Thread Zhang Chen
ed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/migration/colo.h | 6 net/colo-compare.c | 76 net/colo-compare.h | 22 3 files changed, 104 insertions(+) create mode 100644 net/colo-compare.h diff --git a/inclu

[Qemu-devel] [PATCH V7 RESEND 07/17] COLO: Load dirty pages into SVM's RAM cache firstly

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/exec/ram_addr.h | 1 + migration/migration.c | 2 + migration/ram.c | 99 +++-

[Qemu-devel] [PATCH V7 RESEND 01/17] filter-rewriter: fix memory leak for connection in connection_track_table

2018-05-14 Thread Zhang Chen
com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- net/colo.h| 4 +++ net/filter-rewriter.c | 69 ++- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/net/colo.h b/net/colo.h index da6c36dcf7..cd118510c5 100644 ---

[Qemu-devel] [PATCH V7 17/17] COLO: quick failover process by kick COLO thread

2018-05-14 Thread Zhang Chen
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang --- migration/colo.c | 8 1 file

[Qemu-devel] [PATCH V7 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-05-14 Thread Zhang Chen
COLO's failover verdict, it is still necessary to notify users that we exited COLO mode. Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Eric

[Qemu-devel] [PATCH V7 08/17] ram/COLO: Record the dirty pages that SVM received

2018-05-14 Thread Zhang Chen
We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we can record both

[Qemu-devel] [PATCH V7 11/17] qapi: Add new command to query colo status

2018-05-14 Thread Zhang Chen
Libvirt or other high level software can use this command query colo status. You can test this command like that: {'execute':'query-colo-status'} Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- migration/colo.c| 34 ++ qapi/migration.jso

[Qemu-devel] [PATCH V7 14/17] filter: Add handle_event method for NetFilterClass

2018-05-14 Thread Zhang Chen
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/filter.c | 17 + net/net.c| 28 3

[Qemu-devel] [PATCH V7 15/17] filter-rewriter: handle checkpoint and failover event

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- migration/colo.c | 13 + net/filter-rewriter.c | 40 2 files changed, 53 insertions(+) diff --git a/migration/colo.c b/migration/

[Qemu-devel] [PATCH V7 12/17] savevm: split the process of different stages for loadvm/savevm

2018-05-14 Thread Zhang Chen
com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- migration/colo.c | 36 migration/savevm.c | 35 --- migration/savevm.h | 4 3 files changed,

[Qemu-devel] [PATCH V7 04/17] COLO: integrate colo compare with colo frame

2018-05-14 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- migration/colo.c | 42 -- migration/migration.c | 4 ++-- 2 files chan

[Qemu-devel] [PATCH V7 16/17] COLO: notify net filters about checkpoint/failover event

2018-05-14 Thread Zhang Chen
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Signed-off-by: zhanghailiang --- migration/colo.c | 12 1 file changed, 12 insertions(+) diff --git a/migration/colo.c

[Qemu-devel] [PATCH V7 02/17] colo-compare: implement the process of checkpoint

2018-05-13 Thread Zhang Chen
ed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/migration/colo.h | 6 net/colo-compare.c | 76 net/colo-compare.h | 22 ++ 3 files changed, 104 insertions(+) create mode 100644 net/colo-compare.h diff --g

[Qemu-devel] [PATCH V7 07/17] COLO: Load dirty pages into SVM's RAM cache firstly

2018-05-13 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/exec/ram_addr.h | 1 + migration/migration.c | 2 + migration/ram.c | 99 ++

[Qemu-devel] [PATCH V7 03/17] colo-compare: use notifier to notify packets comparing result

2018-05-13 Thread Zhang Chen
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by: Zhang Chen <zhangc...@gmail.com> Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> --- net/colo-compare.c | 32 +--- net/colo-compare.h | 2

[Qemu-devel] [PATCH V7 00/17] COLO: integrate colo frame with block replication and COLO proxy

2018-05-13 Thread Zhang Chen
QAPI command separator problem in patch 11/17. Zhang Chen (12): filter-rewriter: fix memory leak for connection in connection_track_table colo-compare: implement the process of checkpoint colo-compare: use notifier to notify packets comparing result COLO: integrate colo compare

[Qemu-devel] [PATCH V7 09/17] COLO: Flush memory data from ram cache

2018-05-13 Thread Zhang Chen
During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all content of PVM's RAM

[Qemu-devel] [PATCH V7 01/17] filter-rewriter: fix memory leak for connection in connection_track_table

2018-05-13 Thread Zhang Chen
com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- net/colo.h| 4 +++ net/filter-rewriter.c | 69 +-- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/net/colo.h b/net/colo.h index da6c36d..cd11851 100644 ---

[Qemu-devel] [PATCH V7 13/17] COLO: flush host dirty ram from cache

2018-05-13 Thread Zhang Chen
From: zhanghailiang <zhang.zhanghaili...@huawei.com> Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH V7 05/17] COLO: Add block replication into colo process

2018-05-13 Thread Zhang Chen
Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Li Zhijian <lizhij...@cn.fujitsu.com> Signed-off-by

[Qemu-devel] [PATCH V7 06/17] COLO: Remove colo_state migration struct

2018-05-13 Thread Zhang Chen
-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Zhang Chen <zhangc...@gmail.com> --- include/migration/colo.h | 5 ++-- migration/Makefile.objs | 2 +- migration/colo-comm.c| 76 migration/colo.c | 13

Re: [Qemu-devel] [PATCH 17/67] colo: use local path for local headers

2018-05-03 Thread Zhang Chen
ent. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > Reviewed-by: Zhang Chen <zhangc...@gmail.com> > --- > net/colo-compare.c| 2 +- > net/colo.c| 2 +- > net/filter-rewriter.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletion

Re: [Qemu-devel] [PATCH V6 11/17] qapi: Add new command to query colo status

2018-04-21 Thread Zhang Chen
On Tue, Apr 17, 2018 at 8:46 PM, Markus Armbruster <arm...@redhat.com> wrote: > Zhang Chen <zhangc...@gmail.com> writes: > > > Libvirt or other high level software can use this command query colo > status. > > You can test this command like that: > > {'execu

Re: [Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-03-23 Thread Zhang Chen
Thanks zhijian. On Fri, Mar 23, 2018 at 4:34 PM, Li Zhijian <lizhij...@cn.fujitsu.com> wrote: > Just noticed that's a little old, you may need to rebase it > > > Thanks > > > On 03/23/2018 11:51 AM, Li Zhijian wrote: > >> >> >> On 03/21/20

Re: [Qemu-devel] [Bug 1754542] Re: colo: vm crash with segmentation fault

2018-03-21 Thread Zhang Chen
/qemu/tree/qemu-colo-18mar10-legacy Thanks Zhang Chen On Mon, Mar 19, 2018 at 10:08 AM, 李穗恒 <1754...@bugs.launchpad.net> wrote: > Hi Zhang Chen, > I follow the https://wiki.qemu.org/Features/COLO, And Vm no crash. > But SVM rebooting constantly after print RESET, PVM

Re: [Qemu-devel] [Bug 1754542] [NEW] colo: secondary vm crash when execute x-colo-lost-heartbeat

2018-03-17 Thread Zhang Chen
Hi Suiheng, Sorry for slow reply, the document 'COLO-FT.txt' in qemu is out of date, I will update it lately. Please follow this step to run COLO(the command has been changed). https://wiki.qemu.org/Features/COLO Thanks Zhang Chen On Fri, Mar 9, 2018 at 10:54 AM, 李穗恒 <1

Re: [Qemu-devel] [Bug 1754542] [NEW] colo: secondary vm crash when execute x-colo-lost-heartbeat

2018-03-17 Thread Zhang Chen
Hi Suiheng, Sorry for slow reply, the document 'COLO-FT.txt' in qemu is out of date, I will update it lately. Please follow this step to run COLO(the command has been changed). https://wiki.qemu.org/Features/COLO Thanks Zhang Chen On Fri, Mar 9, 2018 at 10:54 AM, 李穗恒 <1

[Qemu-devel] [PATCH V6 17/17] COLO: quick failover process by kick COLO thread

2018-03-11 Thread Zhang Chen
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang --- migration/colo.c | 8 1 file

<    4   5   6   7   8   9   10   11   12   13   >