Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-09 Thread Zheng Chuan via
Hi, Peter,Lei,Jinpu. On 2024/5/8 0:28, Peter Xu wrote: > On Tue, May 07, 2024 at 01:50:43AM +, Gonglei (Arei) wrote: >> Hello, >> >>> -Original Message- >>> From: Peter Xu [mailto:pet...@redhat.com] >>> Sent: Monday, May 6, 2024 11:18 PM >>> To: Gonglei (Arei) >>> Cc: Daniel P.

Re: [PATCH v3 03/23] multifd: Rename used field to num

2021-12-13 Thread Zheng Chuan via
Hi, Juan, Sorry, forget to send to qemu-devel, resend it. On 2021/11/24 18:05, Juan Quintela wrote: > We will need to split it later in zero_num (number of zero pages) and > normal_num (number of normal pages). This name is better. > > Signed-off-by: Juan Quintela > --- > migration/multifd.h

Re: [PATCH V6 19/27] vfio-pci: cpr part 1 (fd and dma)

2021-11-09 Thread Zheng Chuan
Hi, steve On 2021/8/11 1:06, Alex Williamson wrote: > On Fri, 6 Aug 2021 14:43:53 -0700 > Steve Sistare wrote: > >> Enable vfio-pci devices to be saved and restored across an exec restart >> of qemu. >> >> At vfio creation time, save the value of vfio container, group, and device >>

Re: [PATCH v12 0/6] support dirtyrate at the granualrity of vcpu

2021-10-27 Thread Zheng Chuan
Hi. I have no objection for the implement code itself. But we should know or let the user know the performance penalty and conflicted with migration compared to the hash method, especially for the performance of vm with hugepages. On 2021/10/15 10:07, Hyman Huang wrote: > > > 在 2021/10/15

Re: [PATCH V6 00/27] Live Update

2021-10-27 Thread Zheng Chuan
Hi, Steve. Any updates for this series? On 2021/9/1 5:15, Steven Sistare wrote: > On 8/24/2021 5:36 AM, Zheng Chuan wrote: >> Hi, Steve. >> >> I think I have found the problem, it is because the rom_reset() during the >> cpr_exec will write dtb into the mach-virt

Re: [PATCH V6 00/27] Live Update

2021-08-24 Thread Zheng Chuan
arch64 is on our todo list. We will run this case and try > to > reproduce the failure. Thanks for the report. > > - Steve > > On 8/21/2021 4:54 AM, Zheng Chuan wrote: >> Hi, steve >> >> It seems the VM will stuck after cpr-load on AArch64 environment? >>

Re: [PATCH V6 00/27] Live Update

2021-08-21 Thread Zheng Chuan
Hi, steve It seems the VM will stuck after cpr-load on AArch64 environment? My AArch64 environment and test steps: 1. linux kernel: 5.14-rc6 2. QEMU version: v6.1.0-rc2 (patch your patchset), and configure with `../configure --target-list=aarch64-softmmu --disable-werror --enable-kvm` 4. Steps

Re: [PATCH V5 00/25] Live Update [restart] : fork mode?

2021-08-05 Thread Zheng Chuan
Hi, Steve. On 2021/8/5 4:50, Steven Sistare wrote: > On 7/30/2021 9:10 AM, Zheng Chuan wrote: >> Hi, Steve >> I have saw the discussion about the fork+exec mode below: >> https://www.mail-archive.com/qemu-devel@nongnu.org/msg815956.html >> >> And I am still v

Re: [PATCH V5 00/25] Live Update [restart] : fork mode?

2021-08-04 Thread Zheng Chuan
kindly ping? On 2021/7/30 21:10, Zheng Chuan wrote: > Hi, Steve > I have saw the discussion about the fork+exec mode below: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg815956.html > > And I am still very curious and I want to discuss about the possibility to > supp

Re: [PATCH V5 17/25] vfio-pci: cpr part 2

2021-07-31 Thread Zheng Chuan
On 2021/7/30 20:52, Steven Sistare wrote: > On 7/28/2021 12:56 AM, Zheng Chuan wrote: >> On 2021/7/20 2:38, Steven Sistare wrote: >>> On 7/19/2021 2:10 PM, Alex Williamson wrote: >>>> On Mon, 19 Jul 2021 13:44:08 -0400 >>>> Steven Sistare wrote: >&g

[PATCH V5 00/25] Live Update [restart] : fork mode?

2021-07-30 Thread Zheng Chuan
Hi, Steve I have saw the discussion about the fork+exec mode below: https://www.mail-archive.com/qemu-devel@nongnu.org/msg815956.html And I am still very curious and I want to discuss about the possibility to support both fork+exec and exec in cpr framework. 1.Why fork+exec could have some

Re: [PATCH V5 23/25] chardev: cpr for sockets

2021-07-28 Thread Zheng Chuan
Hi. On 2021/7/8 1:20, Steve Sistare wrote: > Save accepted socket fds in the environment before cprsave, and look for > fds in the environment after cprload. Reject cprexec if a socket enables > the TLS or websocket option. Allow a monitor socket by closing it on exec. > > Signed-off-by: Mark

Re: [PATCH V5 17/25] vfio-pci: cpr part 2

2021-07-27 Thread Zheng Chuan
Hi On 2021/7/20 2:38, Steven Sistare wrote: > On 7/19/2021 2:10 PM, Alex Williamson wrote: >> On Mon, 19 Jul 2021 13:44:08 -0400 >> Steven Sistare wrote: >> >>> On 7/16/2021 4:51 PM, Alex Williamson wrote: On Wed, 7 Jul 2021 10:20:26 -0700 Steve Sistare wrote: > Finish

Re: [PATCH V5 16/25] vfio-pci: cpr part 1

2021-07-27 Thread Zheng Chuan
Hi On 2021/7/8 1:20, Steve Sistare wrote: > Enable vfio-pci devices to be saved and restored across an exec restart > of qemu. > > At vfio creation time, save the value of vfio container, group, and device > descriptors in the environment. > > In cprsave and cprexec, suspend the use of virtual

Re: [PATCH V5 13/25] cpr: HMP interfaces for restart

2021-07-27 Thread Zheng Chuan
Hi On 2021/7/8 1:20, Steve Sistare wrote: > cprsave > mode may be "restart" > > cprexec > Call cprexec(). > Arguments: > command : command line to execute, with space-separated arguments > > Signed-off-by: Steve Sistare > --- > hmp-commands.hx | 20 +++- >

Re: [PATCH V5 04/25] cpr: HMP interfaces for reboot

2021-07-27 Thread Zheng Chuan
Hi On 2021/7/8 1:20, Steve Sistare wrote: > cprsave > Call cprsave(). > Arguments: > file : save vmstate to this file name > mode: must be "reboot" > > cprload > Call cprload(). > Arguments: > file : load vmstate from this file name > > cprinfo > Print to stdout a

Re: [PATCH v2 2/2] migration/tls: add error handling in multifd_tls_handshake_thread

2021-03-06 Thread Zheng Chuan
Reviewed-by: Chuan Zheng On 2021/2/9 18:42, Hao Wang wrote: > If any error happens during multifd send thread creating (e.g. channel broke > because new domain is destroyed by the dst), multifd_tls_handshake_thread > may exit silently, leaving main migration thread hanging (ram_save_setup -> >

Re: [PATCH v2 1/2] migration/tls: fix inverted semantics in multifd_channel_connect

2021-03-06 Thread Zheng Chuan
Reviewed-by: Chuan Zheng On 2021/2/9 18:42, Hao Wang wrote: > Function multifd_channel_connect() return "true" to indicate failure, > which is rather confusing. Fix that. > > Signed-off-by: Hao Wang > --- > migration/multifd.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH v4 17/18] migration/rdma: send data for both rdma-pin-all and NOT rdma-pin-all mode

2021-03-06 Thread Zheng Chuan
On 2021/2/4 18:18, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng >> --- >> migration/rdma.c | 65 >> >> 1 file changed, 61 insertions(+), 4

Re: [PATCH v4 10/18] migration/rdma: Create the multifd recv channels for RDMA

2021-03-06 Thread Zheng Chuan
On 2021/2/4 2:59, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> We still don't transmit anything through them, and we only build >> the RDMA connections. >> >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng >> --- >> migration/rdma.c | 69 >>

Re: [PATCH v4 18/18] migration/rdma: RDMA cleanup for multifd migration

2021-03-06 Thread Zheng Chuan
On 2021/2/4 18:32, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/multifd.c | 6 ++ >> migration/multifd.h | 1 + >> migration/rdma.c| 16 +++- >> 3 files changed, 22 insertions(+), 1

Re: [PATCH v4 14/18] migration/rdma: register memory for multifd RDMA channels

2021-03-06 Thread Zheng Chuan
On 2021/2/4 4:12, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng > > This could do with a description in the commit message of the sequence; > I think you're waiting for the semaphore; doing the

Re: [PATCH v4 05/18] migration/rdma: do not need sync main for rdma

2021-03-06 Thread Zheng Chuan
On 2021/2/4 2:10, Dr. David Alan Gilbert wrote: > This patch needs to explain why the sync isn't needed for RDMA. > > Dave > OK. the multifd with tcp will send pages if it has pages to send by the record of multifd_send_state->pages->used while RDMA is using rdma_write_hooks. > * Chuan

Re: [PATCH v4 16/18] migration/rdma: add rdma_channel into Migrationstate field

2021-03-01 Thread Zheng Chuan
On 2021/2/4 4:19, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Multifd RDMA is need to poll when we send data, record it. > > This looks like it's trying to be the equivalent of the 'static int > next_channel' in multifd_send_pages. > > If so, why not mkae

Re: [PATCH v4 12/18] migration/rdma: Create the multifd send channels for RDMA

2021-03-01 Thread Zheng Chuan
On 2021/2/4 3:52, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/multifd.c | 4 ++-- >> migration/multifd.h | 2 ++ >> migration/rdma.c| 57 >> + >> 3

Re: [PATCH v4 13/18] migration/rdma: Add the function for dynamic page registration

2021-03-01 Thread Zheng Chuan
On 2021/2/4 4:06, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add the 'qemu_rdma_registration' function, multifd send threads >> call it to register memory. > > This function is a copy of the code out of qemu_rdma_registration_stop; > with some of the

Re: [PATCH v4 07/18] migration/rdma: add rdma field into multifd send/recv param

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:32, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Note we do want to export any rdma struct, take void * instead. > > You don't need to make this a void *; add a typedef struct RDMAContext > into include/qemu/typedefs.h and then you can use the

Re: [PATCH v4 08/18] migration/rdma: export getQIOChannel to get QIOchannel in rdma

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:49, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng >> --- >> migration/qemu-file.c | 5 + >> migration/qemu-file.h | 1 + >> 2 files changed, 6 insertions(+) >> >> diff --git

Re: [PATCH v4 11/18] migration/rdma: record host_port for multifd RDMA

2021-03-01 Thread Zheng Chuan
On 2021/2/4 3:04, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/migration.c | 1 + >> migration/migration.h | 3 +++ >> migration/rdma.c | 3 +++ >> 3 files changed, 7 insertions(+) >> >> diff --git

Re: [PATCH v4 06/18] migration/rdma: export MultiFDSendParams/MultiFDRecvParams

2021-03-01 Thread Zheng Chuan
On 2021/2/4 2:23, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> MultiFDSendParams and MultiFDRecvParams is need for rdma, export it >> >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng > > I think these become simpler if you just return a NULL on

Re: [PATCH v4 02/18] migration/rdma: judge whether or not the RDMA is used for migration

2021-03-01 Thread Zheng Chuan
On 2021/2/4 1:49, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add enabled_rdma_migration into MigrationState to judge >> whether or not the RDMA is used for migration. >> >> Signed-off-by: Zhimin Feng >> Signed-off-by: Chuan Zheng > Hi, Dave. Sorry for

Re: [PATCH v3 00/18] Support Multifd for RDMA migration

2020-12-14 Thread Zheng Chuan
Hi, Dave. Since qemu 6.0 is open and some patches of this series have been reviewed, might you have time to continue reviewing rest of them ? On 2020/10/25 10:29, Zheng Chuan wrote: > > > On 2020/10/24 3:02, Dr. David Alan Gilbert wrote: >> * Zheng Chuan (zhengch...@hu

Re: [PATCH v3 04/18] migration/rdma: add multifd_setup_ops for rdma

2020-11-10 Thread Zheng Chuan
On 2020/11/10 20:30, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Signed-off-by: Chuan Zheng >> --- >> migration/multifd.c | 6 >> migration/multifd.h | 4 +++ >> migration/rdma.c| 82 >> + >> 3

Re: [PATCH v3 03/18] migration/rdma: create multifd_setup_ops for Tx/Rx thread

2020-11-10 Thread Zheng Chuan
On 2020/11/10 20:11, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Create multifd_setup_ops for TxRx thread, no logic change. >> >> Signed-off-by: Chuan Zheng >> --- >> migration/multifd.c | 44 +++- >>

Re: [PATCH v2] migration/multifd: close TLS channel before socket finalize

2020-11-10 Thread Zheng Chuan
020/11/10 19:56, Zheng Chuan wrote: > > > On 2020/11/10 19:01, Daniel P. Berrangé wrote: >> On Tue, Nov 10, 2020 at 06:45:45PM +0800, Zheng Chuan wrote: >>> >>> >>> On 2020/11/10 18:12, Daniel P. Berrangé wrote: >>>> On Fri, Nov 06, 2020 a

Re: [PATCH v2] migration/multifd: close TLS channel before socket finalize

2020-11-10 Thread Zheng Chuan
On 2020/11/10 19:01, Daniel P. Berrangé wrote: > On Tue, Nov 10, 2020 at 06:45:45PM +0800, Zheng Chuan wrote: >> >> >> On 2020/11/10 18:12, Daniel P. Berrangé wrote: >>> On Fri, Nov 06, 2020 at 06:54:54PM +0800, Chuan Zheng wrote: >>>> Since we now sup

Re: [PATCH v2] migration/multifd: close TLS channel before socket finalize

2020-11-10 Thread Zheng Chuan
On 2020/11/10 18:12, Daniel P. Berrangé wrote: > On Fri, Nov 06, 2020 at 06:54:54PM +0800, Chuan Zheng wrote: >> Since we now support tls multifd, when we cancel migration, the TLS >> sockets will be left as CLOSE-WAIT On Src which results in socket >> leak. >> Fix it by closing TLS channel

Re: [PATCH v2] migration/multifd: close TLS channel before socket finalize

2020-11-09 Thread Zheng Chuan
Kindly ping. Maybe this bugfix is need for qemu-5.2 version. On 2020/11/6 18:54, Chuan Zheng wrote: > Since we now support tls multifd, when we cancel migration, the TLS > sockets will be left as CLOSE-WAIT On Src which results in socket > leak. > Fix it by closing TLS channel before socket

Re: [PATCH] migration/dirtyrate: simplify inlcudes in dirtyrate.c

2020-11-05 Thread Zheng Chuan
Kindly ping for not forgetting this trivial fix:) On 2020/10/30 22:09, Mark Kanda wrote: > On 10/29/2020 10:58 PM, Chuan Zheng wrote: >> Remove redundant blank line which is left by Commit 662770af7c6e8c, >> also take this opportunity to remove redundant includes in dirtyrate.c. >> >>

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-03 Thread Zheng Chuan
need to extract multifd_channel_connect() from multifd_new_send_channel_async as a qio task, which could offload tls handshake to the thread other than qemu main loop? On 2020/11/3 13:52, Zheng Chuan wrote: > > > On 2020/11/3 4:16, Dr. David Alan Gilbert wrote: >> * zhen

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-03 Thread Zheng Chuan
On 2020/11/3 17:29, Daniel Berrange wrote: > This looks to me like a significant implementation flaw in the QEMU > code. Both src and dst QEMU appear to be running code from the main > event loop, and they appear to be doing blocking I/O operations. This is > very bad as we should never have

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-02 Thread Zheng Chuan
On 2020/11/3 4:16, Dr. David Alan Gilbert wrote: > * zhengchuan (zhengch...@huawei.com) wrote: >> Anyone who could help this would be appreciated since we have stuck for >> three days:( >> >> IIUC, the client (Src) has sent first hello message to sever(Dst), however >> due to something

Re: [PATCH v3 00/18] Support Multifd for RDMA migration

2020-10-24 Thread Zheng Chuan
On 2020/10/24 3:02, Dr. David Alan Gilbert wrote: > * Zheng Chuan (zhengch...@huawei.com) wrote: >> >> >> On 2020/10/21 17:25, Zhanghailiang wrote: >>> Hi zhengchuan, >>> >>>> -Original Message- >>>> From: zhengchua

Re: [PATCH v3 00/18] Support Multifd for RDMA migration

2020-10-21 Thread Zheng Chuan
On 2020/10/21 17:25, Zhanghailiang wrote: > Hi zhengchuan, > >> -Original Message- >> From: zhengchuan >> Sent: Saturday, October 17, 2020 12:26 PM >> To: quint...@redhat.com; dgilb...@redhat.com >> Cc: Zhanghailiang ; Chenzhendong (alex) >> ; Xiexiangyou ; wanghao >> (O) ; yubihong ;

Re: [PATCH v2 1/8] migration: Do not use C99 // comments

2020-10-13 Thread Zheng Chuan
Also DEBUG_CACHE in migration/page_cache.c is need to rebase on trace_calls. On 2020/10/13 21:20, Bihong Yu wrote: > Thank you for your review. OK, I will try to rewrite the DPRINTF to use > trace_ instead. > > On 2020/10/13 17:39, Dr. David Alan Gilbert wrote: >> * Bihong Yu

Re: [PATCH] migration/dirtyrate: present dirty rate only when querying the rate has completed

2020-09-28 Thread Zheng Chuan
On 2020/9/28 20:23, David Edmondson wrote: > On Sunday, 2020-09-27 at 12:55:20 +08, Chuan Zheng wrote: > >> Make dirty_rate field optional, present dirty rate only when querying >> the rate has completed. >> The qmp results is shown as follow: >> @unstarted: >>

Re: [PATCH v10 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-09-24 Thread Zheng Chuan
On 2020/9/24 3:03, Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: >> On 9/16/20 1:22 AM, Chuan Zheng wrote: >>> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >>> called >>> >>> Signed-off-by: Chuan Zheng >>> --- >> >>> +++

Re: [PATCH v10 00/12] *** A Method for evaluating dirty page rate ***

2020-09-17 Thread Zheng Chuan
On 2020/9/17 17:38, Dr. David Alan Gilbert wrote: > * Zheng Chuan (zhengch...@huawei.com) wrote: >> >> >> On 2020/9/17 17:15, Dr. David Alan Gilbert wrote: >>> * Chuan Zheng (zhengch...@huawei.com) wrote: >>>> v9 -> v10: >>>> rename f

Re: [PATCH v10 00/12] *** A Method for evaluating dirty page rate ***

2020-09-17 Thread Zheng Chuan
On 2020/9/17 17:15, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> v9 -> v10: >> rename find_page_matched as find_block_matched >> fix wrong termination condition in find_block_matched >> add review-by for patches >> >> v8 -> v9: >> fix wrong

Re: [PATCH v9 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-09-15 Thread Zheng Chuan
On 2020/9/16 0:30, Li Qiang wrote: > Chuan Zheng 于2020年9月15日周二 上午10:34写道: >> >> Compare page hash results for recorded sampled page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> Reviewed-by: Dr. David Alan Gilbert >> --- >> migration/dirtyrate.c | 63 >>

Re: [PATCH v8 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-09-14 Thread Zheng Chuan
On 2020/9/14 22:59, Li Qiang wrote: > Chuan Zheng 于2020年9月14日周一 下午4:52写道: >> >> Record hash results for each sampled page, crc32 is taken to calculate >> hash results for each sampled length in TARGET_PAGE_SIZE. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >>

Re: [PATCH v3 1/6] migration/tls: save hostname into MigrationState

2020-09-14 Thread Zheng Chuan
On 2020/9/14 17:00, Daniel P. Berrangé wrote: > On Sun, Sep 13, 2020 at 10:47:31AM +0800, Chuan Zheng wrote: >> hostname is need in multifd-tls, save hostname into MigrationState. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: Yan Jin >> --- >> migration/channel.c | 6 ++ >>

Re: [PATCH v3 3/6] migration/tls: add MigrationState and tls_hostname into MultiFDSendParams

2020-09-14 Thread Zheng Chuan
On 2020/9/14 17:26, Daniel P. Berrangé wrote: > On Mon, Sep 14, 2020 at 05:20:14PM +0800, Zheng Chuan wrote: >> >> >> On 2020/9/14 17:02, Daniel P. Berrangé wrote: >>> On Sun, Sep 13, 2020 at 10:47:33AM +0800, Chuan Zheng wrote: >>>> MigrationState is n

Re: [PATCH v3 3/6] migration/tls: add MigrationState and tls_hostname into MultiFDSendParams

2020-09-14 Thread Zheng Chuan
On 2020/9/14 17:02, Daniel P. Berrangé wrote: > On Sun, Sep 13, 2020 at 10:47:33AM +0800, Chuan Zheng wrote: >> MigrationState is need for tls session build and tls hostname is need >> for tls handshake, add both MigrationState and tls_hostname >> into MultiFDSendParams. >> >> Signed-off-by:

Re: [PATCH v7 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-09-12 Thread Zheng Chuan
On 2020/9/10 22:27, Li Qiang wrote: > Chuan Zheng 于2020年9月9日周三 下午10:14写道: >> >> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >> called >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 62 >> +++

Re: [PATCH v7 09/12] migration/dirtyrate: Implement set_sample_page_period() and get_sample_page_period()

2020-09-12 Thread Zheng Chuan
On 2020/9/10 21:59, Li Qiang wrote: > Chuan Zheng 于2020年9月9日周三 下午10:15写道: >> >> Implement set_sample_page_period()/get_sample_page_period() to sleep >> specific time between sample actions. >> >> Signed-off-by: Chuan Zheng >> Reviewed-by: Dr. David Alan Gilbert >> Reviewed-by: David

Re: [PATCH v7 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-09-12 Thread Zheng Chuan
On 2020/9/10 21:51, Li Qiang wrote: > Chuan Zheng 于2020年9月9日周三 下午10:14写道: >> >> Record hash results for each sampled page, crc32 is taken to calculate >> hash results for each sampled length in TARGET_PAGE_SIZE. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >>

Re: [PATCH v1 7/7] migration/tls: add trace points for multifd-tls

2020-09-10 Thread Zheng Chuan
On 2020/9/10 21:37, Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 10:52:57PM +0800, Chuan Zheng wrote: >> add trace points for multifd-tls for debug. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: Yan Jin >> --- >> migration/multifd.c| 10 +- >> migration/trace-events |

Re: [PATCH v1 6/7] migration/tls: add support for multifd tls-handshake

2020-09-10 Thread Zheng Chuan
On 2020/9/10 21:25, Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 10:52:56PM +0800, Chuan Zheng wrote: >> add support for multifd tls-handshake >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: Yan Jin >> --- >> migration/multifd.c | 32 +++- >> 1 file

Re: [PATCH v1 2/7] migration/tls: extract migration_tls_client_create for common-use

2020-09-10 Thread Zheng Chuan
On 2020/9/10 21:16, Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 10:52:52PM +0800, Chuan Zheng wrote: >> migration_tls_client_create will be used in multifd-tls, let's >> extract it. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: Yan Jin >> --- >> migration/tls.c | 26

Re: [PATCH v1 1/7] migration/tls: save hostname into MigrationState

2020-09-10 Thread Zheng Chuan
On 2020/9/10 21:11, Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 10:52:51PM +0800, Chuan Zheng wrote: >> hostname is need in multifd-tls, save hostname into MigrationState >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: Yan Jin >> --- >> migration/channel.c | 5 + >>

Re: [PATCH v6 10/12] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-08-31 Thread Zheng Chuan
On 2020/8/31 17:13, David Edmondson wrote: > On Saturday, 2020-08-29 at 10:52:55 +08, Chuan Zheng wrote: > >> Implement calculate_dirtyrate() function. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 45

Re: [PATCH v6 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-08-31 Thread Zheng Chuan
On 2020/8/31 17:10, David Edmondson wrote: > On Saturday, 2020-08-29 at 10:52:52 +08, Chuan Zheng wrote: > >> Compare page hash results for recorded sampled page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 63 >>

Re: [PATCH v6 01/12] migration/dirtyrate: setup up query-dirtyrate framwork

2020-08-31 Thread Zheng Chuan
On 2020/8/31 16:54, David Edmondson wrote: > On Saturday, 2020-08-29 at 10:52:46 +08, Chuan Zheng wrote: > >> Add get_dirtyrate_thread() functions to setup query-dirtyrate >> framework. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> Reviewed-by: Dr. David Alan Gilbert

Re: [PATCH v6 00/12] *** A Method for evaluating dirty page rate ***

2020-08-31 Thread Zheng Chuan
On 2020/8/31 17:05, David Edmondson wrote: > Trying to think like a control plane developer and user (of which I am > neither) raised some questions about the overall interface provided > here. If everyone else is happy with the current interface, then I'll > shut up :-) > > It seems like it

Re: [PATCH v5 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/27 21:07, David Edmondson wrote: > On Thursday, 2020-08-27 at 20:55:51 +08, Zheng Chuan wrote: > >> On 2020/8/27 19:58, David Edmondson wrote: >>> On Thursday, 2020-08-27 at 17:34:13 +08, Zheng Chuan wrote: >>> >>>>>> +/*

Re: [PATCH v5 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/27 19:58, David Edmondson wrote: > On Thursday, 2020-08-27 at 17:34:13 +08, Zheng Chuan wrote: > >>>> +/* >>>> + * Only support query once for each calculation, >>>> + * reset as DIRTY_RATE_STATUS_UNSTARTED after query >>

Re: [PATCH v5 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:26, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:39 +08, Chuan Zheng wrote: > >> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >> called >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 45

Re: [PATCH v5 10/12] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:21, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:38 +08, Chuan Zheng wrote: > >> Implement calculate_dirtyrate() function. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 45

Re: [PATCH v5 09/12] migration/dirtyrate: Implement get_sample_page_period() and block_sample_page_period()

2020-08-27 Thread Zheng Chuan
On 2020/8/27 16:01, Zheng Chuan wrote: > > > On 2020/8/26 18:17, David Edmondson wrote: >> On Monday, 2020-08-24 at 17:14:37 +08, Chuan Zheng wrote: >> >>> Implement get_sample_page_period() and set_sample_page_period() to >>> sleep specific time bet

Re: [PATCH v5 09/12] migration/dirtyrate: Implement get_sample_page_period() and block_sample_page_period()

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:17, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:37 +08, Chuan Zheng wrote: > >> Implement get_sample_page_period() and set_sample_page_period() to >> sleep specific time between sample actions. >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 24

Re: [PATCH v5 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-27 Thread Zheng Chuan
On 2020/8/26 20:30, Dr. David Alan Gilbert wrote: > * David Edmondson (d...@dme.org) wrote: >> On Monday, 2020-08-24 at 17:14:34 +08, Chuan Zheng wrote: >> >>> Record hash results for each sampled page, crc32 is taken to calculate >>> hash results for each sampled 4K-page. >>> >>>

Re: [PATCH v5 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-27 Thread Zheng Chuan
On 2020/8/26 20:35, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Record hash results for each sampled page, crc32 is taken to calculate >> hash results for each sampled 4K-page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >>

Re: [PATCH v5 04/12] migration/dirtyrate: Add dirtyrate statistics series functions

2020-08-27 Thread Zheng Chuan
On 2020/8/26 20:09, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add dirtyrate statistics to record/update dirtyrate info. >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 29 + >> migration/dirtyrate.h | 10

Re: [PATCH v5 02/12] migration/dirtyrate: add DirtyRateStatus to denote calculation status

2020-08-27 Thread Zheng Chuan
On 2020/8/26 19:49, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> add DirtyRateStatus to denote calculating status. >> >> Signed-off-by: Chuan Zheng > > With the minor wording changes from David Edmondson: > OK, will fix it in V6. > > Reviewed-by: Dr. David

Re: [PATCH v5 03/12] migration/dirtyrate: Add RamlockDirtyInfo to store sampled page info

2020-08-26 Thread Zheng Chuan
On 2020/8/26 17:40, Zheng Chuan wrote: > > > On 2020/8/26 17:29, David Edmondson wrote: >> On Monday, 2020-08-24 at 17:14:31 +08, Chuan Zheng wrote: >> >>> Add RamlockDirtyInfo to store sampled page info of each ramblock. >>> >>> Signed-off-by:

Re: [PATCH v5 03/12] migration/dirtyrate: Add RamlockDirtyInfo to store sampled page info

2020-08-26 Thread Zheng Chuan
On 2020/8/26 17:29, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:31 +08, Chuan Zheng wrote: > >> Add RamlockDirtyInfo to store sampled page info of each ramblock. >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.h | 18 ++ >> 1 file changed, 18

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-22 Thread Zheng Chuan
On 2020/8/21 20:39, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Fri, Aug 21, 2020 at 08:22:06PM +0800, Zheng Chuan wrote: >>> >>> >>> On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: >>>> * Daniel P. Ber

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 20:39, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Fri, Aug 21, 2020 at 08:22:06PM +0800, Zheng Chuan wrote: >>> >>> >>> On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: >>>> * Daniel P. Ber

Re: [PATCH v3 05/10] migration/dirtyrate: Record hash results for each sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 1:55, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Thu, Aug 20, 2020 at 06:30:09PM +0100, Dr. David Alan Gilbert wrote: >>> * Chuan Zheng (zhengch...@huawei.com) wrote: Record hash results for each sampled page.

Re: [PATCH v3 06/10] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-08-21 Thread Zheng Chuan
On 2020/8/21 1:36, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Compare page hash results for recorded sampled page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 76 >>

Re: [PATCH v3 02/10] migration/dirtyrate: Add RamlockDirtyInfo to store sampled page info

2020-08-21 Thread Zheng Chuan
On 2020/8/21 0:20, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add RamlockDirtyInfo to store sampled page info of each ramblock. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.h | 18 ++ >> 1

Re: [PATCH v3 10/10] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-21 Thread Zheng Chuan
On 2020/8/21 2:00, Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: >> On 8/16/20 10:20 PM, Chuan Zheng wrote: >>> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >>> called >>> >>> Signed-off-by: Chuan Zheng >>> --- >> >>> +++

Re: [PATCH v3 01/10] migration/dirtyrate: Add get_dirtyrate_thread() function

2020-08-21 Thread Zheng Chuan
On 2020/8/21 0:11, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add get_dirtyrate_thread() functions >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/Makefile.objs | 1 + >> migration/dirtyrate.c | 64 >>

Re: [PATCH v3 09/10] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-08-21 Thread Zheng Chuan
On 2020/8/21 1:57, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Implement calculate_dirtyrate() function. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 46 --

Re: [PATCH v3 03/10] migration/dirtyrate: Add dirtyrate statistics series functions

2020-08-21 Thread Zheng Chuan
On 2020/8/21 0:28, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> Add dirtyrate statistics to record/update dirtyrate info. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 30 ++

Re: [RFC PATCH 5/8] migration/dirtyrate: Compare hash results for recorded ramblock

2020-08-11 Thread Zheng Chuan
On 2020/8/5 1:29, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> From: Zheng Chuan >> >> Compare hash results for recorded ramblock. >> >> Signed-off-by: Zheng Chuan >> Signed-off-by: YanYing Zhang

Re: [RFC PATCH 2/8] migration/dirtyrate: Add block_dirty_info to store dirtypage info

2020-08-07 Thread Zheng Chuan
On 2020/8/7 0:59, Dr. David Alan Gilbert wrote: > * Zheng Chuan (zhengch...@huawei.com) wrote: >> >> >> On 2020/8/5 0:28, Dr. David Alan Gilbert wrote: >>> * Chuan Zheng (zhengch...@huawei.com) wrote: >>>> From: Zheng Chuan >>>> >

Re: [RFC PATCH 0/8] *** A Method for evaluating dirty page rate ***

2020-08-07 Thread Zheng Chuan
On 2020/8/7 0:58, Dr. David Alan Gilbert wrote: > * Zheng Chuan (zhengch...@huawei.com) wrote: >> >> >> On 2020/8/5 0:19, Dr. David Alan Gilbert wrote: >>> * Chuan Zheng (zhengch...@huawei.com) wrote: >>>> From: Zheng Chuan >>> >>> Hi

Re: [RFC PATCH 8/8] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-06 Thread Zheng Chuan
On 2020/8/5 0:28, Eric Blake wrote: > On 7/24/20 10:11 PM, Chuan Zheng wrote: >> From: Zheng Chuan >> >> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >> called >> by libvirt api. >> >> Signed-off-by:

Re: [RFC PATCH 4/8] migration/dirtyrate: Record hash results for each ramblock

2020-08-06 Thread Zheng Chuan
On 2020/8/5 1:00, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> From: Zheng Chuan >> >> Record hash results for each ramblock. > > Please be careful when talking about 'ramblock' since we already use > that for a chunk of me

Re: [RFC PATCH 2/8] migration/dirtyrate: Add block_dirty_info to store dirtypage info

2020-08-06 Thread Zheng Chuan
On 2020/8/5 0:28, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> From: Zheng Chuan >> >> Add block_dirty_info to store dirtypage info for each ramblock >> >> Signed-off-by: Zheng Chuan >> Signed-off-by: YanYing Zhang

Re: [RFC PATCH 0/8] *** A Method for evaluating dirty page rate ***

2020-08-06 Thread Zheng Chuan
On 2020/8/5 0:19, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> From: Zheng Chuan > > Hi, > >> Sometimes it is neccessary to evaluate dirty page rate before migration. >> Users could decide whether to proceed migration base

Re: [RFC PATCH 1/8] migration/dirtyrate: Add get_dirtyrate_thread() function

2020-08-06 Thread Zheng Chuan
On 2020/8/5 0:23, Dr. David Alan Gilbert wrote: > * Chuan Zheng (zhengch...@huawei.com) wrote: >> From: Zheng Chuan >> >> Add get_dirtyrate_thread() functions >> >> Signed-off-by: Zheng Chuan >> Signed-off-by: YanYing Zhang