Re: [Qemu-devel] COLO hybrid mode and other changes

2016-01-21 Thread Hailiang Zhang
Nice work :) On 2016/1/22 3:08, Dr. David Alan Gilbert wrote: Hi, I've got a world with a few COLO changes in that you might like to look at; they're all experimental, but it seems to be working for me. The world is at: https://github.com/orbitfp7/qemu/commits/orbit-wp4-colo-jan16 I

Re: [Qemu-devel] [PATCH 0/6] Some improvements and small fixes for migration

2016-01-22 Thread Hailiang Zhang
ping ? On 2016/1/15 11:37, zhanghailiang wrote: Patch 1 ~ patch 4 are picked from COLO and live memory snapshot series, They are just small improvements for migration codes and have been reviewed by Dave. Patch 5, 6 are small fixes for migration releated documention. Please review. zhanghaili

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-22 Thread Hailiang Zhang
Cc: Dr. David Alan Gilbert On 2016/1/22 16:36, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default buffer filter, it is disabled by default, and has no side effect for delivering packets in net layer. Besides, patch 1 fixes the ouput information of 'i

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-22 Thread Hailiang Zhang
On 2016/1/22 18:07, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default buffer filter, it is disabled by default, and has no side effect for delivering packets in net layer. Why can't

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/22 18:38, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 06:35:48PM +0800, Hailiang Zhang wrote: On 2016/1/22 18:07, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 9:59, Hailiang Zhang wrote: On 2016/1/22 18:38, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 06:35:48PM +0800, Hailiang Zhang wrote: On 2016/1/22 18:07, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 11:32, Jason Wang wrote: On 01/22/2016 06:07 PM, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default buffer filter, it is disabled by default, and has no side effect for

Re: [Qemu-devel] [PATCH RFC 1/7] net/filter: Fix the output information for command 'info network'

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:01, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: The properties of netfilter object could be changed by 'qom-set' command, but the output of 'info network' command is not updated, because it got the old information through nf->info_str, it will not be updated

Re: [Qemu-devel] [PATCH RFC 3/7] net/filter: Skip the disabled filter when delivering packets

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:04, Jason Wang wrote: On 01/22/2016 05:32 PM, Wen Congyang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: If the filter is disabled, don't go through it. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/net.c| 4 2 files changed,

Re: [Qemu-devel] [PATCH RFC 2/7] net/filter: Add a 'status' property for filter object

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:05, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: With this property, users can control if this filter is 'enable' or 'disable'. The default behavior for filter is enabled. Signed-off-by: zhanghailiang Let's squash patch 3 into this for a complete implement

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled, so it has no side effect for packets delivering in qemu net layer. The default buffer filter can b

Re: [Qemu-devel] [PATCH RFC 4/7] net/filter: Introduce a helper to add a filter to the netdev

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:20, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: Signed-off-by: zhanghailiang Commit log please. I will add it in next version, thanks. --- include/net/filter.h | 5 + net/filter.c | 63 ++

Re: [Qemu-devel] [PATCH RFC 5/7] filter-buffer: Accept zero interval

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:19, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We may want to accept zero interval when VM FT solutions like MC or COLO use this filter to release packets on demand. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang --- net/filter-buffer.c | 10 --

Re: [Qemu-devel] [PATCH RFC 7/7] net/filter: prevent the default filter to be deleted

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:25, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: Signed-off-by: zhanghailiang --- net/filter.c | 8 1 file changed, 8 insertions(+) diff --git a/net/filter.c b/net/filter.c index a126a3b..4aafff0 100644 --- a/net/filter.c +++ b/net/filter.c @@ -3

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-25 Thread Hailiang Zhang
On 2016/1/25 15:22, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled, so it has no side effect for packets deliveri

Re: [Qemu-devel] [PATCH] net/filter: Fix the output information for command 'info network'

2016-01-25 Thread Hailiang Zhang
On 2016/1/26 4:49, Eric Blake wrote: On 01/25/2016 02:12 AM, zhanghailiang wrote: The properties of netfilter object could be changed by 'qom-set' command, but the output of 'info network' command is not updated, because it got the old information through nf->info_str, it will not be updated whi

Re: [Qemu-devel] [PATCH RFC 1/7] net/filter: Fix the output information for command 'info network'

2016-01-25 Thread Hailiang Zhang
On 2016/1/26 11:05, Jason Wang wrote: On 01/25/2016 01:58 PM, Hailiang Zhang wrote: On 2016/1/25 13:01, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: The properties of netfilter object could be changed by 'qom-set' command, but the output of 'info network&

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-25 Thread Hailiang Zhang
On 2016/1/26 11:18, Jason Wang wrote: On 01/25/2016 03:22 PM, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled,

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Hailiang Zhang
On 2016/1/26 11:18, Jason Wang wrote: On 01/25/2016 03:22 PM, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled,

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Hailiang Zhang
On 2016/1/26 16:59, Zhang Chen wrote: From: ZhangChen Traffic-mirrorer is a plugin of netfilter. It make qemu has ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirrorer0,host=ip_primary,port=X,server,nowait -traffic-mi

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-26 Thread Hailiang Zhang
On 2016/1/27 13:59, Jason Wang wrote: On 01/27/2016 08:37 AM, Hailiang Zhang wrote: On 2016/1/26 11:18, Jason Wang wrote: On 01/25/2016 03:22 PM, Hailiang Zhang wrote: On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-27 Thread Hailiang Zhang
On 2016/1/27 10:40, Zhang Chen wrote: From: ZhangChen Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packet. we output packet to chardev. usage: -netdev tap,id=hn0 -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait -traffic-mirror,i

Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown command for VM in COLO state

2016-01-27 Thread Hailiang Zhang
On 2016/1/27 3:55, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the shutdo

Re: [Qemu-devel] [PATCH COLO-Frame v13 10/39] COLO: Implement colo checkpoint protocol

2016-01-30 Thread Hailiang Zhang
On 2016/1/29 21:08, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We need communications protocol of user-defined to control the checkpoint process. The new checkpoint request is started by Primary VM, and the interactive process like below: Checkpoint sy

Re: [Qemu-devel] [PATCH COLO-Frame v13 32/39] COLO: Separate the process of saving/loading ram and device state

2016-01-30 Thread Hailiang Zhang
On 2016/1/27 22:14, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to

Re: [Qemu-devel] [PATCH 0/6] Some improvements and small fixes for migration

2016-01-30 Thread Hailiang Zhang
Hi Juan & Amit, This series is prerequisite of COLO, and all of them have been reviewed by Dave, Could you please review and merge them ? Thanks, Hailiang On 2016/1/15 11:37, zhanghailiang wrote: Patch 1 ~ patch 4 are picked from COLO and live memory snapshot series, They are just small impro

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add a is_default member for struct NetFilterState to indicate whether the filter is default

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 11:05, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: Make the helper object_create() public and fix its first parameter to accept NULL value. Looks not very nice. Maybe pass a new predicate func for sanity check it better. OK, but here is it better to check if

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 15:27, Jason Wang wrote: On 02/01/2016 02:19 PM, Hailiang Zhang wrote: On 2016/2/1 11:05, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: Make the helper object_create() public and fix its first parameter to accept NULL value. Looks not very nice. Maybe pass a

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 16:05, Yang Hongyang wrote: On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 17:04, Jason Wang wrote: On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 17:18, Jason Wang wrote: On 02/01/2016 04:21 PM, Hailiang Zhang wrote: Instead of this, I wonder maybe it's better to: - store the default filter property into a pointer to string Do you mean, pass a string parameter which stores the filter property instead of assemble

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 17:49, Jason Wang wrote: On 02/01/2016 05:39 PM, Hailiang Zhang wrote: On 2016/2/1 17:18, Jason Wang wrote: On 02/01/2016 04:21 PM, Hailiang Zhang wrote: Instead of this, I wonder maybe it's better to: - store the default filter property into a pointer to string D

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 18:41, Daniel P. Berrange wrote: On Wed, Jan 27, 2016 at 04:29:37PM +0800, zhanghailiang wrote: Make the helper object_create() public and fix its first parameter to accept NULL value. Signed-off-by: zhanghailiang Cc: Paolo Bonzini --- v2: - New patch --- include/qemu-common.h

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
Hi Jason, On 2016/2/1 17:42, Jason Wang wrote: On 02/01/2016 05:22 PM, Hailiang Zhang wrote: On 2016/2/1 17:04, Jason Wang wrote: On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 17:42, Jason Wang wrote: On 02/01/2016 05:22 PM, Hailiang Zhang wrote: On 2016/2/1 17:04, Jason Wang wrote: On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Hailiang Zhang
On 2016/2/1 18:43, Daniel P. Berrange wrote: On Wed, Jan 27, 2016 at 04:29:38PM +0800, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add a is_default member for struct NetFilterState to indicate wheth

Re: [Qemu-devel] [PATCH v3 0/4] Netfilter: Add each netdev a default filter

2016-02-02 Thread Hailiang Zhang
Hi Hongyang, On 2016/2/2 11:11, Yang Hongyang wrote: If we have to add a default filter, then I have a suggestion only for this series: 1. Add a nop filter. filter-nop.c I'm not quite sure if we really need to add a new type 'nop' filter, because it is only a special case for buffer-filter, wh

Re: [Qemu-devel] [PATCH v14 7/8] Implement new driver for block replication

2016-02-03 Thread Hailiang Zhang
On 2016/2/3 17:55, Wen Congyang wrote: On 02/03/2016 05:32 PM, Stefan Hajnoczi wrote: On Wed, Feb 03, 2016 at 09:29:15AM +0800, Wen Congyang wrote: On 02/02/2016 10:34 PM, Stefan Hajnoczi wrote: On Mon, Feb 01, 2016 at 09:13:36AM +0800, Wen Congyang wrote: On 01/29/2016 11:46 PM, Stefan Hajno

Re: [Qemu-devel] [PATCH 0/6] Some improvements and small fixes for migration

2016-02-04 Thread Hailiang Zhang
On 2016/2/4 19:08, Amit Shah wrote: On (Fri) 15 Jan 2016 [11:37:40], zhanghailiang wrote: Patch 1 ~ patch 4 are picked from COLO and live memory snapshot series, They are just small improvements for migration codes and have been reviewed by Dave. Patch 5, 6 are small fixes for migration releate

Re: [Qemu-devel] [PATCH 2/6] migration: Rename the'file' member of MigrationState

2016-02-04 Thread Hailiang Zhang
On 2016/2/4 19:10, Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: On (Thu) 04 Feb 2016 [10:50:16], Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: On (Fri) 15 Jan 2016 [11:37:42], zhanghailiang wrote: Rename the 'file' member of MigrationState

Re: [Qemu-devel] [PATCH v3 2/4] net/filter: Introduce a helper to add a filter to the netdev

2016-02-04 Thread Hailiang Zhang
On 2016/2/2 11:14, Yang Hongyang wrote: On 02/01/2016 08:01 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add a is_default member for struct NetFilterState to indicate whether the filter is defa

Re: [Qemu-devel] [PATCH v3 4/4] net/filter: Add a default filter to each netdev

2016-02-04 Thread Hailiang Zhang
On 2016/2/2 11:16, Yang Hongyang wrote: On 02/01/2016 08:01 PM, zhanghailiang wrote: We add each netdev a default buffer filter, and the default buffer filter is disabled, so it has no side effect for packets delivering in qemu net layer. The default buffer filter can be used by COLO or Micro

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-04 Thread Hailiang Zhang
On 2016/2/5 14:19, Jason Wang wrote: On 02/01/2016 06:40 PM, Hailiang Zhang wrote: On 2016/2/1 17:42, Jason Wang wrote: On 02/01/2016 05:22 PM, Hailiang Zhang wrote: On 2016/2/1 17:04, Jason Wang wrote: On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-05 Thread Hailiang Zhang
On 2016/2/5 15:40, Jason Wang wrote: On 02/05/2016 03:01 PM, Hailiang Zhang wrote: On 2016/2/5 14:19, Jason Wang wrote: On 02/01/2016 06:40 PM, Hailiang Zhang wrote: On 2016/2/1 17:42, Jason Wang wrote: On 02/01/2016 05:22 PM, Hailiang Zhang wrote: On 2016/2/1 17:04, Jason Wang wrote

Re: [Qemu-devel] [PATCH v15 7/9] Introduce new APIs to do replication operation

2016-02-14 Thread Hailiang Zhang
On 2016/2/5 12:18, Changlong Xie wrote: Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 94 +

Re: [Qemu-devel] [PATCH COLO-Frame v14 24/40] COLO: Process shutdown command for VM in COLO state

2016-02-15 Thread Hailiang Zhang
On 2016/2/12 23:09, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the shutd

Re: [Qemu-devel] [PATCH v15 0/9] Block replication for continuous checkpoints

2016-02-17 Thread Hailiang Zhang
ping... COLO prototype is based on this series, but it seems that this series didn't got enough reviewing and feedback, we will miss the train of qemu 2.6 version :( Since COLO is still a prototype, some problems could be fixed in later developing, and we hope COLO prototype to be merged as quick

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object

2016-02-17 Thread Hailiang Zhang
Hi Jason, Happy spring festival! ;) On 2016/2/18 11:00, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: With this property, users can control if this filter is 'enable' or 'disable'. The default behavior for filter is enabled. We will skip the disabled filter when delivering

Re: [Qemu-devel] [PATCH COLO-Frame v14 32/40] net/filter: Introduce a helper to add a filter to the netdev

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:19, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- include/net/filter.h | 7

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:31, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: Enable all buffer filters that added by COLO while go into COLO process, and disable them while exit COLO. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v14: - New patch --- migration/c

Re: [Qemu-devel] [PATCH COLO-Frame v14 35/40] COLO/filter: add each netdev a buffer filter

2016-02-17 Thread Hailiang Zhang
On 2016/2/18 11:23, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: For COLO periodic mode, it need to buffer packets that sent by VM, and we will not release these packets until finish a checkpoint. Here, we add each netdev a buffer-filter that will be controlled by COLO. It i

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Hailiang Zhang
Hi Jason, On 2016/2/18 11:46, Hailiang Zhang wrote: On 2016/2/18 11:31, Jason Wang wrote: On 02/06/2016 05:28 PM, zhanghailiang wrote: Enable all buffer filters that added by COLO while go into COLO process, and disable them while exit COLO. Signed-off-by: zhanghailiang Cc: Jason Wang Cc

Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo checkpoint protocol

2015-11-25 Thread Hailiang Zhang
On 2015/11/25 22:01, Eric Blake wrote: On 11/24/2015 12:00 PM, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We need communications protocol of user-defined to control the checkpoint process. +static int colo_ctl_get(QEMUFile *f, uint32_t require, uin

Re: [Qemu-devel] [PATCH COLO-Frame v11 10/39] COLO: Implement colo checkpoint protocol

2015-11-25 Thread Hailiang Zhang
On 2015/11/25 3:00, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We need communications protocol of user-defined to control the checkpoint process. The new checkpoint request is started by Primary VM, and the interactive process like below: Checkpoint sy

Re: [Qemu-devel] [RFC PATCH 3/9] colo-proxy: add colo-proxy framework

2015-11-27 Thread Hailiang Zhang
On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen Colo-proxy is a plugin of qemu netfilter like filter-buffer and dump Signed-off-by: zhangchen --- net/Makefile.objs | 1 + net/colo-proxy.c | 139 ++ net/colo-proxy.h | 63 +

Re: [Qemu-devel] [RFC PATCH 4/9] colo-proxy: add colo-proxy setup work

2015-11-27 Thread Hailiang Zhang
On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen Secondary setup socket server for colo-forward primary setup connect to secondary for colo-forward add data structure will be uesed Signed-off-by: zhangchen --- net/colo-proxy.c | 87 +

Re: [Qemu-devel] [RFC PATCH 5/9] net/colo-proxy: add colo packet handler

2015-11-27 Thread Hailiang Zhang
On 2015/11/27 20:27, Zhang Chen wrote: From: zhangchen add primary and secondary handler Signed-off-by: zhangchen --- net/colo-proxy.c | 105 +-- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git a/net/colo-proxy.c b/net/colo-

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-11-27 Thread Hailiang Zhang
On 2015/11/27 19:39, Yang Hongyang wrote: On 2015年11月24日 17:25, zhanghailiang wrote: We add each netdev a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer a

Re: [Qemu-devel] [PATCH COLO-Frame v11 38/39] colo: Use default buffer-filter to buffer and release packets

2015-11-27 Thread Hailiang Zhang
On 2015/11/27 20:51, Yang Hongyang wrote: On 2015年11月24日 17:25, zhanghailiang wrote: Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v11: - Use new helper functions to buffer and release p

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-01 Thread Hailiang Zhang
On 2015/11/30 9:19, Li Zhijian wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer any

Re: [Qemu-devel] [Patch v12 00/10] Block replication for continuous checkpoints

2015-12-01 Thread Hailiang Zhang
On 2015/12/1 18:40, Dr. David Alan Gilbert wrote: * Wen Congyang (we...@cn.fujitsu.com) wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/

Re: [Qemu-devel] [PATCH COLO-Frame v11 18/39] COLO: Flush PVM's cached RAM into SVM's memory

2015-12-01 Thread Hailiang Zhang
On 2015/11/27 13:29, Li Zhijian wrote: On 11/24/2015 05:25 PM, zhanghailiang 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 SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be

Re: [Qemu-devel] [PATCH COLO-Frame v11 32/39] COLO: Separate the process of saving/loading ram and device state

2015-12-01 Thread Hailiang Zhang
On 2015/11/27 13:10, Li Zhijian wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to slave without using Q

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-02 Thread Hailiang Zhang
On 2015/12/3 9:17, Wen Congyang wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filter-buffer is 'nop'. For the default filter-buffer, it will not buffer an

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-02 Thread Hailiang Zhang
On 2015/12/3 14:25, Wen Congyang wrote: On 12/03/2015 11:53 AM, Hailiang Zhang wrote: On 2015/12/3 9:17, Wen Congyang wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets

Re: [Qemu-devel] [PATCH COLO-Frame v11 14/39] ram: Split host_from_stream_offset() into two helper functions

2015-12-02 Thread Hailiang Zhang
On 2015/12/2 2:19, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to get hva (host) address from block and the offs

Re: [Qemu-devel] [PATCH COLO-Frame v11 14/39] ram: Split host_from_stream_offset() into two helper functions

2015-12-02 Thread Hailiang Zhang
On 2015/12/3 15:19, Hailiang Zhang wrote: On 2015/12/2 2:19, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Split host_from_stream_offset() into two parts: One is to get ram block, which the block idstr may be get from migration stream, the other is to

Re: [Qemu-devel] [PATCH COLO-Frame v11 15/39] COLO: Load PVM's dirty pages into SVM's RAM cache temporarily

2015-12-03 Thread Hailiang Zhang
On 2015/12/2 3:02, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.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 break SVM. We need to ensure receving all data before load the

Re: [Qemu-devel] [PATCH COLO-Frame v11 16/39] ram/COLO: Record the dirty pages that SVM received

2015-12-03 Thread Hailiang Zhang
On 2015/12/2 3:36, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. We record them by re-using migration dirty bitmap. Signed-off-by: zhanghailiang ---

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-03 Thread Hailiang Zhang
On 2015/12/3 15:21, Yang Hongyang wrote: On 2015年12月03日 14:48, Hailiang Zhang wrote: On 2015/12/3 14:25, Wen Congyang wrote: On 12/03/2015 11:53 AM, Hailiang Zhang wrote: On 2015/12/3 9:17, Wen Congyang wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default

Re: [Qemu-devel] [PATCH COLO-Frame v11 18/39] COLO: Flush PVM's cached RAM into SVM's memory

2015-12-03 Thread Hailiang Zhang
On 2015/12/2 4:06, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.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 SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM

Re: [Qemu-devel] [TCG only][Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-12-03 Thread Hailiang Zhang
On 2015/12/3 17:24, Dr. David Alan Gilbert wrote: * Li Zhijian (lizhij...@cn.fujitsu.com) wrote: Hi all, Does anyboday remember the similar issue post by hailiang months ago http://patchwork.ozlabs.org/patch/454322/ At least tow bugs about migration had been fixed since that. Yes, I wondere

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-06 Thread Hailiang Zhang
On 2015/12/3 15:21, Yang Hongyang wrote: On 2015年12月03日 14:48, Hailiang Zhang wrote: On 2015/12/3 14:25, Wen Congyang wrote: On 12/03/2015 11:53 AM, Hailiang Zhang wrote: On 2015/12/3 9:17, Wen Congyang wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: We add each netdev a default

Re: [Qemu-devel] [PATCH COLO-Frame v11 19/39] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2015-12-10 Thread Hailiang Zhang
On 2015/12/10 2:50, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Arm

Re: [Qemu-devel] [PATCH COLO-Frame v11 08/39] migration: Rename the'file' member of MigrationState

2015-12-10 Thread Hailiang Zhang
On 2015/12/10 14:41, Wen Congyang wrote: On 11/24/2015 05:25 PM, zhanghailiang wrote: Rename the 'file' member of MigrationState to 'to_dst_file'. Signed-off-by: zhanghailiang Cc: Dr. David Alan Gilbert --- v11: - Only rename 'file' member of MigrationState You forgot to update migration/rd

Re: [Qemu-devel] [PATCH COLO-Frame v11 23/39] COLO: Implement failover work for Primary VM

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 2:34, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For PVM, if there is failover request from users. The colo thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by:

Re: [Qemu-devel] [PATCH COLO-Frame v11 24/39] COLO: Implement failover work for Secondary VM

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 2:50, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If users require SVM to takeover work, colo incoming thread should exit from loop while failover BH helps backing to migration incoming coroutine. Signed-off-by: zhanghailiang Signed-off-b

Re: [Qemu-devel] [PATCH COLO-Frame v11 27/39] COLO failover: Shutdown related socket fd when do failover

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 4:03, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If the net connection between COLO's two sides is broken while colo/colo incoming thread is blocked in 'read'/'write' socket fd. It will not detect this error until connect timeout. It wil

Re: [Qemu-devel] [PATCH 1/4] error: Strip trailing '\n' from error string arguments (again)

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 2:16, Cornelia Huck wrote: On Thu, 10 Dec 2015 18:23:49 +0100 Markus Armbruster wrote: Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they keep coming back. Tracked down with the Coccinelle semantic patch from commit 312fd5f. Cc: Fam Zheng Cc: Peter Crosthwaite

Re: [Qemu-devel] [PATCH COLO-Frame v11 27/39] COLO failover: Shutdown related socket fd when do failover

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 17:18, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2015/12/11 4:03, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If the net connection between COLO's two sides is broken while colo

Re: [Qemu-devel] [PATCH COLO-Frame v11 23/39] COLO: Implement failover work for Primary VM

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 17:22, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2015/12/11 2:34, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For PVM, if there is failover request from users. The colo thread will exit the

Re: [Qemu-devel] [PATCH COLO-Frame v11 25/39] COLO: implement default failover treatment

2015-12-11 Thread Hailiang Zhang
On 2015/12/11 3:01, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If we detect some error in colo, we will wait for some time, hoping users also detect it. If users don't issue failover command. We will go into default failover procedure, which the PVM wi

Re: [Qemu-devel] [PATCH COLO-Frame v12 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 17:46, Wen Congyang wrote: On 12/15/2015 04:22 PM, zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH COLO-Frame v12 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 17:46, Wen Congyang wrote: On 12/15/2015 04:22 PM, zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is On by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Gonglei Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH COLO-Frame v12 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 20:14, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 12th version of COLO. As usual, this version of COLO is only support periodic checkpoint, just like MicroCheckpointing and Remus does. Here is only COLO frame part, you can ge

Re: [Qemu-devel] [PATCH 3/6] Postcopy: Send events/change state on incoming side

2015-12-15 Thread Hailiang Zhang
On 2015/12/16 3:02, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" I missed the calls to send migration events on the destination side as we enter postcopy. Take care when adding them not to do it after state has been freed. Signed-off-by: Dr. David Alan Gilbert --- migr

Re: [Qemu-devel] [PATCH COLO-Frame v12 05/38] migration: Add state records for migration incoming

2015-12-15 Thread Hailiang Zhang
On 2015/12/16 1:36, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify it

Re: [Qemu-devel] [PATCH COLO-Frame v12 26/38] COLO failover: Shutdown related socket fd when do failover

2015-12-15 Thread Hailiang Zhang
On 2015/12/15 18:23, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If the net connection between COLO's two sides is broken while colo/colo incoming thread is blocked in 'read'/'write' socket fd. It will not detect this error until connect timeout. It wi

Re: [Qemu-devel] [PATCH COLO-Frame v13 17/39] COLO: Load VMState into qsb before restore it

2016-01-10 Thread Hailiang Zhang
On 2016/1/5 3:00, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We should not destroy the state of SVM (Secondary VM) until we receive the whole state from the PVM (Primary VM), in case the primary fails in the middle of sending the state, so, here we cac

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-10 Thread Hailiang Zhang
Hi Jason, Could you please help reviewing the filter part of this series ? Thanks, Hailiang On 2015/12/29 15:09, zhanghailiang wrote: We add each netdev (except vhost-net) a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filte

Re: [Qemu-devel] [PATCHv7 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-01-11 Thread Hailiang Zhang
Hi, It seems that, Jan Kiszka is maintaining SLIRP (From MAINTAINERS file), Maybe he could make a help to merge this series. TO: J. Kiszka Thanks, Hailiang On 2016/1/11 23:04, Samuel Thibault wrote: Hello, Samuel Thibault, on Sat 19 Dec 2015 22:24:40 +0100, wrote: This is another respin of

Re: [Qemu-devel] [PATCH COLO-Frame v12 11/38] COLO: Add a new RunState RUN_STATE_COLO

2016-01-12 Thread Hailiang Zhang
On 2016/1/11 21:16, Markus Armbruster wrote: Hailiang Zhang writes: On 2015/12/19 17:27, Markus Armbruster wrote: zhanghailiang writes: Guest will enter this state when paused to save/restore VM state under colo checkpoint. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by

Re: [Qemu-devel] [PATCH COLO-Frame v12 10/38] COLO: Implement colo checkpoint protocol

2016-01-12 Thread Hailiang Zhang
On 2016/1/11 20:47, Markus Armbruster wrote: Hailiang Zhang writes: Hi Markus, On 2015/12/19 16:54, Markus Armbruster wrote: Jumping in at v12 for a bit of QAPI review (and whatever else catched my eye nearby), please pardon my ignorance of COLO in general, and previous review of this

Re: [Qemu-devel] [RFC 12/13] migration/ram: Fix some helper functions' parameter to use PageSearchStatus

2016-01-12 Thread Hailiang Zhang
On 2016/1/12 1:55, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Some helper functions use parameters 'RAMBlock *block' and 'ram_addr_t *offset', We can use 'PageSearchStatus *pss' directly instead, with this change, we can reduce the number of parameters

Re: [Qemu-devel] [RFC 03/13] migration: Allow -incoming to work on file: urls

2016-01-12 Thread Hailiang Zhang
On 2016/1/12 4:02, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Usage: -incoming file:/path/to/vm_statefile Signed-off-by: zhanghailiang Signed-off-by: Benoit Canet This could again be split out of this series; however I have some comments. --- - R

Re: [Qemu-devel] [PATCH] migration: not send zero page header in ram bulk stage

2016-01-15 Thread Hailiang Zhang
On 2016/1/15 17:48, Liang Li wrote: Now that VM's RAM pages are initialized to zero, (VM's RAM is allcated with the mmap() and MAP_ANONYMOUS option, or mmap() without MAP_SHARED if hugetlbfs is used.) so there is no need to send the zero page header to destination. It seems that this patch is

Re: [Qemu-devel] [PATCH] migration: not send zero page header in ram bulk stage

2016-01-18 Thread Hailiang Zhang
Hi, On 2016/1/15 18:24, Li, Liang Z wrote: It seems that this patch is incorrect, if the no-zero pages are zeroed again during !ram_bulk_stage, we didn't send the new zeroed page, there will be an error. If not in ram_bulk_stage, still send the header, could you explain why it's wrong? Lian

Re: [Qemu-devel] [PATCH] migration: not send zero page header in ram bulk stage

2016-01-18 Thread Hailiang Zhang
On 2016/1/16 2:57, Dr. David Alan Gilbert wrote: * Liang Li (liang.z...@intel.com) wrote: Now that VM's RAM pages are initialized to zero, (VM's RAM is allcated with the mmap() and MAP_ANONYMOUS option, or mmap() without MAP_SHARED if hugetlbfs is used.) so there is no need to send the zero page

  1   2   3   4   >