[PATCH v2] MAINTAINERS: Change my email address

2021-12-13 Thread Hailiang Zhang
The zhang.zhanghaili...@huawei.com email address has been stopped. Change it to my new email address. Signed-off-by: Hailiang Zhang --- hi Juan & Dave, Firstly, thank you for your working on maintaining the COLO framework. I didn't have much time on it in the past days. I may have som

[PATCH] MAINTAINERS: Change my email address

2021-12-13 Thread Hailiang Zhang
The zhang.zhanghaili...@huawei.com email address has been stopped. Change it to my new email address. Signed-off-by: Hailiang Zhang --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7543eb4d59..5d9c4243b4 100644 --- a/MAINTAINERS

[PATCH 2/3] COLO: Migrate dirty pages during the gap of checkpointing

2020-02-16 Thread Hailiang Zhang
We can migrate some dirty pages during the gap of checkpointing, by this way, we can reduce the amount of ram migrated during checkpointing. Signed-off-by: Hailiang Zhang --- migration/colo.c | 69 +++--- migration/migration.h | 1 + migration/trace

[PATCH 0/3] Optimize VM's downtime while do checkpoint in COLO

2020-02-16 Thread Hailiang Zhang
pages during the gap time of two checkpoints when SVM and PVM are running. The third patch tries to reduce the pause time of backup ram into cache in secondary part. Hailiang Zhang (3): migration/colo: wrap incoming checkpoint process into new helper COLO: Migrate dirty pages during the g

[PATCH 3/3] COLO: Optimize memory back-up process

2020-02-16 Thread Hailiang Zhang
, though it affects the speed of the migration, but it obviously reduce the downtime of back-up all SVM'S memory in COLO preparing stage. Signed-off-by: Hailiang Zhang --- migration/colo.c | 3 +++ migration/ram.c | 35 +++ migration/ram.h | 1 + 3 files change

[PATCH 1/3] migration/colo: wrap incoming checkpoint process into new helper

2020-02-16 Thread Hailiang Zhang
Split checkpoint incoming process into a helper. Signed-off-by: Hailiang Zhang --- migration/colo.c | 260 --- 1 file changed, 133 insertions(+), 127 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index 2c88aa57a2..93c5a452fb 100644

Re: [Qemu-devel] [PATCH v7 0/5] virtio-balloon: free page hint reporting support

2018-05-29 Thread Hailiang Zhang
On 2018/4/24 14:13, Wei Wang wrote: This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pa

Re: [Qemu-devel] 答复: [BUG] Windows 7 got stuck easily while run PCMark10 application

2017-12-01 Thread Hailiang Zhang
On 2017/12/2 2:37, Paolo Bonzini wrote: On 01/12/2017 18:45, Gonglei (Arei) wrote: I also think it's windows bug, the problem is that it doesn't occur on xen platform. It's a race, it may just be that RTC PIO is faster in Xen because it's implemented in the hypervisor. No, In Xen, it does not

Re: [Qemu-devel] colo-compare: segfault and assert on colo_compare_finalize

2017-08-08 Thread Hailiang Zhang
Hi, Did you test this branch https://github.com/coloft/qemu/tree/colo-for-qemu-2.10-2017-4-22 ? This seems to be an already known problem, I'm not quite sure, it may be fixed by this patch b19456dd0ea4eb418ad093f092adbb882be13054 char: Fix removing wrong GSource that be found by fd_in_tag We

Re: [Qemu-devel] [PATCH 2/3] COLO: Define COLOMode without QAPI

2017-07-28 Thread Hailiang Zhang
On 2017/7/29 1:17, Dr. David Alan Gilbert wrote: * Markus Armbruster (arm...@redhat.com) wrote: COLOMode is defined in the QAPI schema, but not used there. Of the stuff QAPI generates for it only the typedef is actually used. Use of QAPI is pointless and only complicates things, so don't. Hmm

Re: [Qemu-devel] [PATCH 05/12] migration: Move colo.h to migration/

2017-05-15 Thread Hailiang Zhang
On 2017/5/15 19:04, Juan Quintela wrote: "Dr. David Alan Gilbert" wrote: D> * Juan Quintela (quint...@redhat.com) wrote: There are functions only used by migration code. That's only mostly true; see the current 'integrate colo frame with block replication and net compare' series (posted 22nd A

Re: [Qemu-devel] [PATCH V4 02/12] net/filter-mirror.c: Add new option to enable vnet support for filter-mirror

2017-05-12 Thread Hailiang Zhang
Hi, On 2017/5/12 9:41, Zhang Chen wrote: We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr=on Is there any way to detect w

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 16:09, Xiao Guangrong wrote: On 05/11/2017 08:24 PM, Paolo Bonzini wrote: On 11/05/2017 14:07, Zhoujian (jay) wrote: -* Scan sptes if dirty logging has been stopped, dropping those -* which can be collapsed into a single large-page spte. Later -* page fau

Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/6] COLO block replication supports shared disk case

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 3:17, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:15PM +0800, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement it and this is the 4th version. Please review and any commits are welcomed. Cc: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v4 5/6] replication: Implement block replication for shared disk case

2017-05-12 Thread Hailiang Zhang
On 2017/5/12 3:15, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:20PM +0800, zhanghailiang wrote: @@ -612,6 +644,16 @@ static void replication_do_checkpoint(ReplicationState *rs, Error **errp) error_propagate(errp, local_err); break; } +

Re: [Qemu-devel] [Qemu-block] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 3:08, Stefan Hajnoczi wrote: On Wed, Apr 12, 2017 at 10:05:17PM +0800, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk

Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-05-11 Thread Hailiang Zhang
On 2017/4/18 13:59, Xie Changlong wrote: On 04/12/2017 10:05 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk (Stefan) v2: - Mov

Re: [Qemu-devel] [PATCH v2 0/3] Remove old MigrationParams

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 0:32, Juan Quintela wrote: Hi Changes from v1: - make migrate_block_set_* take a boolean - disable block migration in colo to maintain semantics. Please review, Juan. [v1] Upon a time there were MigrationParms (only used for block migration) and then MigrationParams used for ever

Re: [Qemu-devel] [PATCH 2/3] migration: Remove use of old MigrationParams

2017-05-11 Thread Hailiang Zhang
On 2017/5/12 0:33, Juan Quintela wrote: Hailiang Zhang wrote: Hi, Hmm you don't seem to have replaced this with anything. I think that's a behavioural change; the trick COLO did (I'm not sure if this is still the way it works) is that they initiate the first migration with

Re: [Qemu-devel] [PATCH 2/3] migration: Remove use of old MigrationParams

2017-05-04 Thread Hailiang Zhang
Hi, On 2017/5/4 16:51, Juan Quintela wrote: "Dr. David Alan Gilbert" wrote: * Juan Quintela (quint...@redhat.com) wrote: We have change in the previous patch to use migration capabilities for it. Notice that we continue using the old command line flags from migrate command from the time bein

Re: [Qemu-devel] [PATCH 1/3] colo-compare: serialize compare thread's initialization with main thread

2017-05-03 Thread Hailiang Zhang
Hi Jason, On 2017/4/25 19:33, Jason Wang wrote: On 2017年04月25日 17:59, Hailiang Zhang wrote: On 2017/4/25 16:41, Jason Wang wrote: On 2017年04月24日 14:03, Hailiang Zhang wrote: On 2017/4/24 12:10, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: We call qemu_chr_fe_set_handlers

Re: [Qemu-devel] [PATCH] ram: Split dirty bitmap by RAMBlock

2017-04-26 Thread Hailiang Zhang
On 2017/4/26 15:32, Juan Quintela wrote: Both the ram bitmap and the unsent bitmap are split by RAMBlock. Signed-off-by: Juan Quintela -- Fix compilation when DEBUG_POSTCOPY is enabled (thanks Hailiang) Signed-off-by: Juan Quintela --- include/exec/ram_addr.h | 13 +- include/m

Re: [Qemu-devel] [PATCH RESEND v2 01/18] net/colo: Add notifier/callback related helpers for filter

2017-04-26 Thread Hailiang Zhang
On 2017/4/25 19:40, Jason Wang wrote: On 2017年04月22日 16:35, zhanghailiang wrote: We will use this notifier to help COLO to notify filter object to do something, like do checkpoint, or process failover event. Cc: Jason Wang Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen Signed-off-by: L

Re: [Qemu-devel] [PATCH v2 05/18] COLO: Handle shutdown command for VM in COLO state

2017-04-26 Thread Hailiang Zhang
On 2017/4/24 22:51, Eric Blake wrote: On 04/22/2017 03:25 AM, zhanghailiang wrote: If VM is in COLO FT state, we need to do some extra works before starting normal shutdown process. Secondary VM will ignore the shutdown command if users issue it directly to Secondary VM. COLO will capture shutd

Re: [Qemu-devel] [PATCH 1/3] colo-compare: serialize compare thread's initialization with main thread

2017-04-26 Thread Hailiang Zhang
On 2017/4/25 19:33, Jason Wang wrote: On 2017年04月25日 17:59, Hailiang Zhang wrote: On 2017/4/25 16:41, Jason Wang wrote: On 2017年04月24日 14:03, Hailiang Zhang wrote: On 2017/4/24 12:10, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: We call qemu_chr_fe_set_handlers() in colo

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 19:57, Zhang Chen wrote: On 04/20/2017 02:40 PM, Jason Wang wrote: On 2017年04月20日 14:36, Zhang Chen wrote: On 04/20/2017 02:20 PM, Hailiang Zhang wrote: On 2017/4/20 12:32, Zhang Chen wrote: When network traffic heavy, compare_pri_rs_finalize() and compare_sec_rs_finalize

Re: [Qemu-devel] [PATCH] ram: Split dirty bitmap by RAMBlock

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 18:11, Juan Quintela wrote: Both the ram bitmap and the unsent bitmap are split by RAMBlock. Signed-off-by: Juan Quintela --- include/exec/ram_addr.h | 13 +- include/migration/postcopy-ram.h | 3 - migration/postcopy-ram.c | 5 +- migration/ram.c

Re: [Qemu-devel] [PATCH RESEND v2 08/18] ram/COLO: Record the dirty pages that SVM received

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 2:29, Juan Quintela wrote: zhanghailiang wrote: 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

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

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 2:27, Juan Quintela wrote: zhanghailiang 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 state into SVM. We use an extra memory to c

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

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 2:18, Juan Quintela wrote: zhanghailiang 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 while not doing checkpoint, change DEFAULT_MIGRATE_X_CHECKPOINT_DELAY to 200*100. Besides, we forgot to release colo_c

Re: [Qemu-devel] [PATCH 1/3] colo-compare: serialize compare thread's initialization with main thread

2017-04-25 Thread Hailiang Zhang
On 2017/4/25 16:41, Jason Wang wrote: On 2017年04月24日 14:03, Hailiang Zhang wrote: On 2017/4/24 12:10, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: We call qemu_chr_fe_set_handlers() in colo-compare thread, it is used to detach watched fd from default main context, so it has

Re: [Qemu-devel] [QEMU-2.8] Source QEMU crashes with: "bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed"

2017-04-25 Thread Hailiang Zhang
On 2017/4/24 15:59, Kashyap Chamarthy wrote: On Sat, Apr 22, 2017 at 05:23:49PM +0800, Hailiang Zhang wrote: Hi, Hi Hailiang, I think the bellow patch can fix your problme. [PATCH 2/4] qmp-cont: invalidate on RUN_STATE_PRELAUNCH https://patchwork.kernel.org/patch/9591885/ Hmm, the above

Re: [Qemu-devel] [PATCH 2/3] colo-compare: Check main_loop value before call g_main_loop_quit

2017-04-23 Thread Hailiang Zhang
On 2017/4/24 12:13, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: If some errors happen before main_loop is initialized in colo compare thread, qemu will go into finalizing process where we call g_main_loop_quit(s->main_loop), if main_loop is NULL, there will be an error report:

Re: [Qemu-devel] [PATCH 1/3] colo-compare: serialize compare thread's initialization with main thread

2017-04-23 Thread Hailiang Zhang
On 2017/4/24 12:10, Jason Wang wrote: On 2017年04月20日 15:46, zhanghailiang wrote: We call qemu_chr_fe_set_handlers() in colo-compare thread, it is used to detach watched fd from default main context, so it has chance to handle the same watched fd with main thread concurrently, which will trigger

Re: [Qemu-devel] [QEMU-2.8] Source QEMU crashes with: "bdrv_co_pwritev: Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed"

2017-04-22 Thread Hailiang Zhang
Hi, I think the bellow patch can fix your problme. [PATCH 2/4] qmp-cont: invalidate on RUN_STATE_PRELAUNCH https://patchwork.kernel.org/patch/9591885/ Actually, we encounter the same problem in our test, we fix it with the follow patch: From 0e4d6d706afd9909b5fd71536b45c58af60892f8 Mon Se

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

2017-04-21 Thread Hailiang Zhang
On 2017/4/20 13:15, Jason Wang wrote: On 2017年04月18日 14:58, Hailiang Zhang wrote: On 2017/4/18 11:55, Jason Wang wrote: On 2017年04月17日 19:04, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57

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

2017-04-20 Thread Hailiang Zhang
On 2017/4/20 17:09, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2017/4/8 1:18, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: There are several stages during loadvm/savevm process. In different stage

Re: [Qemu-devel] [PATCH] COLO-compare: Add compare_lock aviod comparison conflict

2017-04-19 Thread Hailiang Zhang
On 2017/4/20 12:32, Zhang Chen wrote: When network traffic heavy, compare_pri_rs_finalize() and compare_sec_rs_finalize() have a chance to confilct. Both of them call colo_compare_connection() to compare packet, But during compare_pri_rs_finalize() comparison, have secondary packet come and call

Re: [Qemu-devel] 答复: [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-19 Thread Hailiang Zhang
On 2017/4/19 10:02, Xiao Guangrong wrote: On 04/13/2017 05:38 PM, Hailiang Zhang wrote: On 2017/4/13 17:35, Xiao Guangrong wrote: On 04/13/2017 05:29 PM, Hailiang Zhang wrote: On 2017/4/13 17:18, Xiao Guangrong wrote: On 04/13/2017 05:05 PM, Zhanghailiang wrote: Hi, -邮件原件- 发件人

Re: [Qemu-devel] [PATCH v2] char: Fix removing wrong GSource that be found by fd_in_tag

2017-04-18 Thread Hailiang Zhang
On 2017/4/18 16:11, Marc-André Lureau wrote: Hi - Original Message - We use fd_in_tag to find a GSource, fd_in_tag is return value of g_source_attach(GSource *source, GMainContext *context), the return value is unique only in the same context, so we may get the same values with differen

Re: [Qemu-devel] [PATCH] char: Fix removing wrong GSource that be found by fd_in_tag

2017-04-18 Thread Hailiang Zhang
On 2017/4/18 21:36, Eric Blake wrote: On 04/14/2017 05:10 AM, Marc-André Lureau wrote: Hi - Original Message - We use fd_in_tag to find a GSource, fd_in_tag is return value of g_source_attach(GSource *source, GMainContext *context), the return value is unique only in the same context,

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

2017-04-17 Thread Hailiang Zhang
On 2017/4/18 11:55, Jason Wang wrote: On 2017年04月17日 19:04, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM

Re: [Qemu-devel] [PULL 2/8] replication: clarify permissions

2017-04-17 Thread Hailiang Zhang
On 2017/4/18 9:23, Eric Blake wrote: On 03/17/2017 08:15 AM, Kevin Wolf wrote: From: Changlong Xie Even if hidden_disk, secondary_disk are backing files, they all need write permissions in replication scenario. Otherwise we will encouter below exceptions on secondary side during adding nbd ser

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

2017-04-17 Thread Hailiang Zhang
Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang wrote: While do checkpoint, we need to flush all the unhandled packets

Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-16 Thread Hailiang Zhang
On 2017/4/12 22:28, Eric Blake wrote: On 04/12/2017 09:05 AM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add proper comment for primary_disk (Stefan) v2: - Move g_

Re: [Qemu-devel] [PATCH] char: Fix removing wrong GSource that be found by fd_in_tag

2017-04-14 Thread Hailiang Zhang
Hi, On 2017/4/14 18:10, Marc-André Lureau wrote: Hi - Original Message - We use fd_in_tag to find a GSource, fd_in_tag is return value of g_source_attach(GSource *source, GMainContext *context), the return value is unique only in the same context, so we may get the same values with dif

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

2017-04-13 Thread Hailiang Zhang
Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang 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 thi

Re: [Qemu-devel] 答复: [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-13 Thread Hailiang Zhang
On 2017/4/13 17:35, Xiao Guangrong wrote: On 04/13/2017 05:29 PM, Hailiang Zhang wrote: On 2017/4/13 17:18, Xiao Guangrong wrote: On 04/13/2017 05:05 PM, Zhanghailiang wrote: Hi, -邮件原件- 发件人: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] 代表 Xiao Guangrong 发送时间: 2017年4月

Re: [Qemu-devel] 答复: [PATCH 0/5] mc146818rtc: fix Windows VM clock faster

2017-04-13 Thread Hailiang Zhang
On 2017/4/13 17:18, Xiao Guangrong wrote: On 04/13/2017 05:05 PM, Zhanghailiang wrote: Hi, -邮件原件- 发件人: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] 代表 Xiao Guangrong 发送时间: 2017年4月13日 16:53 收件人: Paolo Bonzini; m...@redhat.com; mtosa...@redhat.com 抄送: qemu-devel@nongnu.o

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

2017-04-10 Thread Hailiang Zhang
On 2017/4/8 1:18, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: There are several stages during loadvm/savevm process. In different stage, migration incoming processes different types of sections. We want to control these stages more accuracy, it will bene

Re: [Qemu-devel] [PATCH v2 0/5] Disable hotplug during migration

2017-04-10 Thread Hailiang Zhang
On 2017/4/6 21:13, Juan Quintela wrote: Hi This updates patches with all the comments received. I move qdev_unplug() to make linux-user compile. Please, review. [RFC - v1] This series disable hotplug/unplug during migration. Thank to Markus for explaining where I had to put the checks. Why?

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

2017-04-10 Thread Hailiang Zhang
On 2017/4/8 1:06, 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 s

Re: [Qemu-devel] [PATCH 01/15] net/colo: Add notifier/callback related helpers for filter

2017-04-10 Thread Hailiang Zhang
On 2017/4/7 23:46, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We will use this notifier to help COLO to notify filter object to do something, like do checkpoint, or process failover event. Cc: Jason Wang Signed-off-by: zhanghailiang --- net/colo.c

Re: [Qemu-devel] [PATCH 15/15] COLO: flush host dirty ram from cache

2017-04-10 Thread Hailiang Zhang
On 2017/4/8 1:39, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Cc: Juan Quintela Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Signed-off-by: zhanghail

Re: [Qemu-devel] [PATCH v2] migration: Fix colo hang in socket_accept_incoming_migration

2017-03-26 Thread Hailiang Zhang
Hi, It seems that there is no difference from your previous version. You don't have to re-send it if there are no changes. This patch has been reviewed, so you can just wait until maintainers process it :) Thanks. On 2017/3/27 9:58, Guang Wang wrote: From: Wang guang The channel socket was

Re: [Qemu-devel] 答复: Re: 答复: Re: 答复: Re: 答复: Re: [BUG]COLO failover hang

2017-03-22 Thread Hailiang Zhang
l] 答复: Re: 答复: Re: [BUG]COLO failover hang > > > > > > On 2017/3/21 19:56, Dr. David Alan Gilbert wrote: > > * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: > >> Hi, > >> > >> Thanks for reporting this, and i confirmed it in my test, and it is a bug. > >> > >> Though we tried to call qem

Re: [Qemu-devel] 答复: Re: 答复: Re: 答复: Re: [BUG]COLO failover hang

2017-03-22 Thread Hailiang Zhang
ng On 2017/3/21 19:56, Dr. David Alan Gilbert wrote: > * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: >> Hi, >> >> Thanks for reporting this, and i confirmed it in my test, and it is a bug. >> >> Though we tried to call qemu_file_shutdown() to shutdown the related fd, in >> case COLO thre

Re: [Qemu-devel] 答复: Re: 答复: Re: [BUG]COLO failover hang

2017-03-21 Thread Hailiang Zhang
On 2017/3/21 19:56, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: Hi, Thanks for reporting this, and i confirmed it in my test, and it is a bug. Though we tried to call qemu_file_shutdown() to shutdown the related fd, in case COLO thread/incoming

Re: [Qemu-devel] 答复: Re: 答复: Re: [BUG]COLO failover hang

2017-03-21 Thread Hailiang Zhang
Hi, Thanks for reporting this, and i confirmed it in my test, and it is a bug. Though we tried to call qemu_file_shutdown() to shutdown the related fd, in case COLO thread/incoming thread is stuck in read/write() while do failover, but it didn't take effect, because all the fd used by COLO (also

Re: [Qemu-devel] 答复: Re: 答复: Re: [BUG]COLO failover hang

2017-03-21 Thread Hailiang Zhang
Hi, On 2017/3/21 16:10, wang.guan...@zte.com.cn wrote: Thank you。 I have test aready。 When the Primary Node panic,the Secondary Node qemu hang at the same place。 Incorrding http://wiki.qemu-project.org/Features/COLO ,kill Primary Node qemu will not produce the problem,but Primary Node panic

Re: [Qemu-devel]   [PATCHV2] COLO: COLO-FT.txt err

2017-03-17 Thread Hailiang Zhang
Hi, Thanks for reporting this. This patch has wrong format and it seems that you pasted the content to this email directly, please follow the introduction bellow to submit a patch: http://wiki.qemu-project.org/Contribute/SubmitAPatch Thanks, Hailiang On 2017/3/18 13:43, wang.guan...@zte.com.c

Re: [Qemu-devel] [PATCH] virtio-serial-bus: Delete timer from list before free it

2017-03-14 Thread Hailiang Zhang
ping... ? On 2017/3/8 4:01, Amit Shah wrote: On (Mon) 06 Mar 2017 [11:29:31], zhanghailiang wrote: Signed-off-by: zhanghailiang Reviewed-by: Amit Shah Michael, please pick this up. Amit

Re: [Qemu-devel] [PATCH v3 5/6] replication: Implement block replication for shared disk case

2017-03-07 Thread Hailiang Zhang
Hi Stefan, Sorry for the delayed reply. On 2017/2/28 1:37, Stefan Hajnoczi wrote: On Fri, Jan 20, 2017 at 11:47:59AM +0800, zhanghailiang wrote: Just as the scenario of non-shared disk block replication, we are going to implement block replication from many basic blocks that are already in QEM

Re: [Qemu-devel] [PATCH v3 2/6] replication: add shared-disk and shared-disk-id options

2017-02-28 Thread Hailiang Zhang
On 2017/2/28 1:10, Stefan Hajnoczi wrote: On Fri, Jan 20, 2017 at 11:47:56AM +0800, zhanghailiang wrote: @@ -119,12 +136,31 @@ static int replication_open(BlockDriverState *bs, QDict *options, "The option mode's value should be primary or secondary"); goto fail;

Re: [Qemu-devel] [PATCH v3 1/6] docs/block-replication: Add description for shared-disk case

2017-02-28 Thread Hailiang Zhang
On 2017/2/28 0:46, Stefan Hajnoczi wrote: On Fri, Jan 20, 2017 at 11:47:55AM +0800, zhanghailiang wrote: +Secondary: + -drive if=none,driver=qcow2,file.filename=/mnt/ramfs/hidden_disk.img,id=hidden_disk0,\ +backing.driver=raw,backing.file.filename=1.raw \ + -drive if=virtio,id=active-di

Re: [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd

2017-02-28 Thread Hailiang Zhang
On 2017/3/1 0:14, Andrea Arcangeli wrote: Hello, On Tue, Feb 28, 2017 at 09:48:26AM +0800, Hailiang Zhang wrote: Yes, for current implementing of live snapshot, it supports tcg, but does not support kvm mode, the reason i have mentioned above, if you try to implement it, i think you need to

Re: [Qemu-devel] [RFC 00/13] Live memory snapshot based on userfaultfd

2017-02-27 Thread Hailiang Zhang
implement it, i think you need to start from userfaultfd supporting KVM. There is scenario for it, But I'm blocked by other things these days. I'm glad to discuss with you if you planed to do it. Thanks. Hailiang Thanks a lot, Christian On 20/08/2016 08:31, Hailiang Zhang wrote: Hi, I up

Re: [Qemu-devel] [PATCH V10 0/2] Add new qmp commands to suppurt Xen COLO

2017-02-27 Thread Hailiang Zhang
On 2017/2/28 6:52, Stefano Stabellini wrote: On Mon, 27 Feb 2017, Eric Blake wrote: On 02/27/2017 04:31 PM, Stefano Stabellini wrote: Eric, are you OK with this series going upstream? If so, do you want me to send the pull request for it or are you going to handle it? Both patches have my R-b

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-27 Thread Hailiang Zhang
On 2017/2/27 17:05, Jason Wang wrote: On 2017年02月27日 14:53, Hailiang Zhang wrote: I think the issue is that your code can not differ A from B. We have a parameter 'fin_ack_seq' recording the sequence of 'FIN=1,ACK=1,seq=w,ack=u+1' and if the ack value from the opposite

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-27 Thread Hailiang Zhang
On 2017/2/27 15:34, Zhang Chen wrote: On 02/27/2017 03:28 PM, Hailiang Zhang wrote: On 2017/2/27 15:03, Zhang Chen wrote: On 02/25/2017 02:58 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-26 Thread Hailiang Zhang
On 2017/2/27 15:03, Zhang Chen wrote: On 02/25/2017 02:58 PM, Hailiang Zhang wrote: On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-26 Thread Hailiang Zhang
On 2017/2/27 13:35, Jason Wang wrote: On 2017年02月27日 12:09, Hailiang Zhang wrote: On 2017/2/27 11:40, Jason Wang wrote: On 2017年02月27日 11:11, Hailiang Zhang wrote: On 2017/2/23 12:16, Jason Wang wrote: On 2017年02月22日 16:51, Hailiang Zhang wrote: On 2017/2/22 16:45, Hailiang Zhang

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-26 Thread Hailiang Zhang
On 2017/2/27 11:40, Jason Wang wrote: On 2017年02月27日 11:11, Hailiang Zhang wrote: On 2017/2/23 12:16, Jason Wang wrote: On 2017年02月22日 16:51, Hailiang Zhang wrote: On 2017/2/22 16:45, Hailiang Zhang wrote: On 2017/2/22 16:07, Jason Wang wrote: On 2017年02月22日 11:46, zhanghailiang wrote

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-26 Thread Hailiang Zhang
On 2017/2/23 12:16, Jason Wang wrote: On 2017年02月22日 16:51, Hailiang Zhang wrote: On 2017/2/22 16:45, Hailiang Zhang wrote: On 2017/2/22 16:07, Jason Wang wrote: On 2017年02月22日 11:46, zhanghailiang wrote: After a net connection is closed, we didn't clear its releated resourc

Re: [Qemu-devel] [PATCH v2 3/3] filter-rewriter: skip net_checksum_calculate() while offset = 0

2017-02-26 Thread Hailiang Zhang
On 2017/2/24 16:08, Zhang Chen wrote: On 02/22/2017 11:46 AM, zhanghailiang wrote: While the offset of packets's sequence for primary side and secondary side is zero, it is unnecessary to call net_checksum_calculate() to recalculate the checksume value of packets. Signed-off-by: zhanghailiang

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-24 Thread Hailiang Zhang
On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 +--- 1 file changed, 21 insertio

Re: [Qemu-devel] [PATCH 2/3] COLO-compare: Optimize colo_packet_compare_common

2017-02-24 Thread Hailiang Zhang
On 2017/2/25 11:32, Zhang Chen wrote: Add offset args for colo_packet_compare_common, optimize colo_packet_compare_icmp() and colo_packet_compare_udp() just compare the IP payload. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 +--- 1 file changed, 21 insertio

Re: [Qemu-devel] [PATCH 1/3] COLO-compare: Add minimum packet size check and some fix

2017-02-24 Thread Hailiang Zhang
Hi, On 2017/2/25 11:32, Zhang Chen wrote: Add packet minimum size check in colo_packet_compare_udp() and colo_packet_compare_udp() like colo_packet_compare_icmp(), rename function colo_packet_compare() to colo_packet_compare_common() that we will reuse it later. Signed-off-by: Zhang Chen ---

Re: [Qemu-devel] [PATCH v3 0/6] COLO block replication supports shared disk case

2017-02-23 Thread Hailiang Zhang
ping ... ? On 2017/1/20 11:47, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement it and this is the third version. Last posted series patches: https://lists.gnu.org/archive/html/qemu-block/2016-12/msg00039.html You can refer to the above

Re: [Qemu-devel] [PATCH 05/15] COLO: Handle shutdown command for VM in COLO state

2017-02-22 Thread Hailiang Zhang
Hi Eric, On 2017/2/22 23:35, Eric Blake wrote: On 02/21/2017 09:42 PM, zhanghailiang wrote: If VM is in COLO FT state, we need to do some extra works before starting normal shutdown process. Secondary VM will ignore the shutdown command if users issue it directly to Secondary VM. COLO will cap

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

2017-02-22 Thread Hailiang Zhang
Hi, On 2017/2/22 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang 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 this process, which runs inside of compare threads

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-22 Thread Hailiang Zhang
On 2017/2/22 16:45, Hailiang Zhang wrote: On 2017/2/22 16:07, Jason Wang wrote: On 2017年02月22日 11:46, zhanghailiang wrote: After a net connection is closed, we didn't clear its releated resources in connection_track_table, which will lead to memory leak. Not a real leak but would

Re: [Qemu-devel] [PATCH v2 2/3] filter-rewriter: fix memory leak for connection in connection_track_table

2017-02-22 Thread Hailiang Zhang
On 2017/2/22 16:07, Jason Wang wrote: On 2017年02月22日 11:46, zhanghailiang wrote: After a net connection is closed, we didn't clear its releated resources in connection_track_table, which will lead to memory leak. Not a real leak but would lead reset of hash table if too many closed connectio

Re: [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error

2017-02-21 Thread Hailiang Zhang
On 2017/2/21 10:44, Zhang Chen wrote: We use g_queue_init() to init s->conn_list, so we should use g_queue_clear() to instead of g_queue_free(). Signed-off-by: Zhang Chen Reviewed-by: zhanghailiang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-21 Thread Hailiang Zhang
On 2017/2/8 13:24, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Xen colo will need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- migration/colo.c | 17 qapi-schema.json | 60 +

Re: [Qemu-devel] [PATCH V7 1/2] Add a new qmp command to start/stop replication

2017-02-21 Thread Hailiang Zhang
On 2017/2/8 13:24, Zhang Chen wrote: We can call this qmp command to start/stop replication outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang Reviewed-by: Eric Blake Reviewed-by: Stefano Stabellini Reviewed-by: zhanghailiang ---

Re: [Qemu-devel] [PATCH 1/3] net/colo: fix memory double free error

2017-02-20 Thread Hailiang Zhang
On 2017/2/21 10:25, Zhang Chen wrote: On 02/20/2017 04:01 PM, zhanghailiang wrote: The 'primary_list' and 'secondary_list' members of struct Connection is not allocated through dynamically g_queue_new(), but we free it by using g_queue_free(), which will lead to a double-free bug. Signed-off-

Re: [Qemu-devel] [PATCH v2 3/4] char: remove the right fd been watched in qemu_chr_fe_set_handlers()

2017-02-16 Thread Hailiang Zhang
On 2017/2/16 21:04, Marc-André Lureau wrote: Hi On Thu, Feb 16, 2017 at 4:49 PM Hailiang Zhang < zhang.zhanghaili...@huawei.com> wrote: Hi, On 2017/2/16 18:40, Marc-André Lureau wrote: Hi On Thu, Feb 16, 2017 at 10:08 AM zhanghailiang < zhang.zhanghaili...@huawei.com> wrote:

Re: [Qemu-devel] [PATCH v2 3/4] char: remove the right fd been watched in qemu_chr_fe_set_handlers()

2017-02-16 Thread Hailiang Zhang
Hi, On 2017/2/16 18:40, Marc-André Lureau wrote: Hi On Thu, Feb 16, 2017 at 10:08 AM zhanghailiang < zhang.zhanghaili...@huawei.com> wrote: We can call qemu_chr_fe_set_handlers() to add/remove fd been watched in 'context' which can be either default main context or other explicit context. But

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:27, Zhang Chen wrote: On 02/15/2017 04:34 PM, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c

Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:25, Zhang Chen wrote: On 02/15/2017 04:34 PM, zhanghailiang wrote: We should call g_main_loop_quit() to notify colo compare thread to exit, Or it will run in g_main_loop_run() forever. Besides, the finalizing process can't happen in context of colo thread, it is reasonable to

Re: [Qemu-devel] [PATCH 3/5] colo-compare: release all unhandled packets in finalize function

2017-02-15 Thread Hailiang Zhang
On 2017/2/16 10:34, Jason Wang wrote: On 2017年02月15日 16:34, zhanghailiang wrote: We should release all unhandled packets before finalize colo compare. Besides, we need to free connection_track_table, or there will be a memory leak bug. Signed-off-by: zhanghailiang --- net/colo-compare.c |

Re: [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage

2017-02-13 Thread Hailiang Zhang
On 2017/2/14 12:08, Jason Wang wrote: On 2017年02月14日 10:32, Hailiang Zhang wrote: Hi Jason, I think the better way is notify the comparing thread and let it do the releasing. You probably need similar mechanism to notify from comparing thread to checkpoint thread. It seems that

Re: [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage

2017-02-13 Thread Hailiang Zhang
On 2017/2/7 17:21, Jason Wang wrote: On 2017年02月07日 16:19, Hailiang Zhang wrote: On 2017/2/7 15:57, Jason Wang wrote: On 2017年02月07日 15:54, Hailiang Zhang wrote: Hi Jason, On 2017/2/6 20:53, Jason Wang wrote: On 2017年02月06日 19:11, Hailiang Zhang wrote: On 2017/2/6 17:35, Jason Wang

Re: [Qemu-devel] [PATCH 0/3] COLO: fix some bugs

2017-02-13 Thread Hailiang Zhang
On 2017/2/10 23:44, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Hi, This series fix three bugs of COLO. patch 1 fix one usage case which users want to change checkpoint-delay with an extream big value set before, the new value may not take effect until

Re: [Qemu-devel] [PATCH 2/3] COLO: Shutdown related socket fd while do failover

2017-02-12 Thread Hailiang Zhang
On 2017/2/9 3:53, Dr. David Alan Gilbert wrote: * Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: On 2017/1/18 19:01, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If the net connection between primary host and secondary host breaks while COLO

Re: [Qemu-devel] [PATCH 1/3] COLO: fix setting checkpoint-delay not working properly

2017-02-08 Thread Hailiang Zhang
On 2017/2/8 18:38, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If we set checkpoint-delay through command 'migrate-set-parameters', It will not take effect until we finish last sleep chekpoint-delay, That's will be offensive espeically when we want to ch

Re: [Qemu-devel] [PATCH 2/3] COLO: Shutdown related socket fd while do failover

2017-02-08 Thread Hailiang Zhang
On 2017/1/18 19:01, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If the net connection between primary host and secondary host breaks while COLO/COLO incoming threads are doing read() or write(). It will block until connection is timeout, and the failover

Re: [Qemu-devel] [libvirt] [Block Replication] Question about supporting COLO in libvirt

2017-02-08 Thread Hailiang Zhang
On 2017/2/6 20:39, Daniel P. Berrange wrote: On Mon, Feb 06, 2017 at 08:34:28PM +0800, Hailiang Zhang wrote: Hi, I'm trying to implement supporting COLO in libvirt, But i found an annoying problem that libvirt does not support the command line option argument syntax we used for

Re: [Qemu-devel] [PATCH 1/3] colo-compare: reconstruct the mutex lock usage

2017-02-07 Thread Hailiang Zhang
On 2017/2/7 17:21, Jason Wang wrote: On 2017年02月07日 16:19, Hailiang Zhang wrote: On 2017/2/7 15:57, Jason Wang wrote: On 2017年02月07日 15:54, Hailiang Zhang wrote: Hi Jason, On 2017/2/6 20:53, Jason Wang wrote: On 2017年02月06日 19:11, Hailiang Zhang wrote: On 2017/2/6 17:35, Jason Wang

  1   2   3   4   >