[PATCH v4 09/18] migration/rdma: add multifd_rdma_load_setup() to setup multifd rdma

2021-02-02 Thread Chuan Zheng
Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/rdma.c | 52 1 file changed, 52 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index e0ea86d..996afb0 100644 --- a/migration/rdma.c +++ b/migration

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

2021-02-02 Thread Chuan Zheng
Multifd RDMA is need to poll when we send data, record it. Signed-off-by: Chuan Zheng --- migration/migration.c | 1 + migration/migration.h | 1 + migration/rdma.c | 14 ++ 3 files changed, 16 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index

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

2021-02-02 Thread Chuan Zheng
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 a/migration/qemu-file.c b/migration/qemu-file.c index be21518..37f6201 100644 --- a/migration/qemu-file.c +++ b/migration/qemu

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 65 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 2097839..c19a91f 100644 --- a/migration/rdma.c +++ b

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

2021-02-02 Thread Chuan Zheng
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 ++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --

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

2021-02-02 Thread Chuan Zheng
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 --- migration/migration.c | 13 + migration/migration.h | 6 ++ 2 files changed, 19 insertions(+) diff --git a

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 3 ++ migration/rdma.c| 92 +++-- 2 files changed, 93 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 919a414..1186246

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

2021-02-02 Thread Chuan Zheng
Note we do want to export any rdma struct, take void * instead. Signed-off-by: Chuan Zheng --- migration/multifd.h | 8 1 file changed, 8 insertions(+) diff --git a/migration/multifd.h b/migration/multifd.h index d57756c..b17a2c1 100644 --- a/migration/multifd.h +++ b/migration

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/migration.c | 1 + migration/migration.h | 3 +++ migration/rdma.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 129c81a..b8f4844 100644 --- a/migration/migration.c +++ b/migration

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 4820702..5d34950 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -583,6 +583,10 @@ void

[PATCH v4 15/18] migration/rdma: only register the memory for multifd channels

2021-02-02 Thread Chuan Zheng
All data is sent by multifd Channels, so we only register its for multifd channels and main channel don't register its. Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/rdma.c b/migration/r

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

2021-02-02 Thread Chuan Zheng
Add the 'qemu_rdma_registration' function, multifd send threads call it to register memory. Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/migratio

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 6 ++ migration/multifd.h | 1 + migration/rdma.c| 16 +++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index 1186246..4031648 100644 --- a/migration/multifd.c

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

2021-02-02 Thread Chuan Zheng
Create multifd_setup_ops for TxRx thread, no logic change. Signed-off-by: Chuan Zheng --- migration/multifd.c | 44 +++- migration/multifd.h | 7 +++ 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/migration/multifd.c b/migration

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

2021-02-02 Thread Chuan Zheng
MultiFDSendParams and MultiFDRecvParams is need for rdma, export it Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 26 ++ migration/multifd.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/migration/multifd.c b/migration

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 4 ++-- migration/multifd.h | 2 ++ migration/rdma.c| 57 + 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index ae0b7f0

[PATCH v4 00/18] Support Multifd for RDMA migration

2021-02-02 Thread Chuan Zheng
es export multifd_rdma_ops instead of a function fix minior codestyle issues v2 -> v3: create multifd ops for both tcp and rdma do not export rdma to avoid multifd code in mess fix build issue for non-rdma fix some codestyle and buggy code Chuan Zheng (18): migrati

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

2021-02-02 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 6 + migration/multifd.h | 5 migration/rdma.c| 71 + 3 files changed, 82 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index cb1fc01..4820702 100644

[PATCH v4 01/18] migration/rdma: add the 'migrate_rdma_pin_all' function

2021-02-02 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 9 + migration/migration.h | 1 + 2 files changed, 10 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 1986cb8..447dfb9 100644 --- a

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

2020-11-12 Thread Chuan Zheng
this bug is fixed by commit(a1af605bd5ade1a6dd571f553a6746b97f3d6869), close the issue as fixed ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net

[PATCH v2] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration

2020-11-11 Thread Chuan Zheng
When creating new tls client, the tioc->master will be referenced which results in socket leaking after multifd_save_cleanup if we cancel migration. Fix it by do object_unref() after tls client creation. Suggested-by: Daniel P. Berrangé Signed-off-by: Chuan Zheng --- migration/multifd.c

[RESEND][PATCH] multifd/tls: fix memoryleak of the QIOChannelSocket object when canceling migration

2020-11-10 Thread Chuan Zheng
When creating new tls client, the tioc->master will be referenced, we need dereferenced it after tls handshake. Signed-off-by: Chuan Zheng --- migration/multifd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index 68b1

[PATCH] multifd/tls: fix memoryleak of the QIOChannelSocket object when canceling migration

2020-11-10 Thread Chuan Zheng
When creating new tls client, the tioc->master will be referred, we need unrefer it after tls handshake. Signed-off-by: Chuan Zheng --- migration/multifd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index 68b171f..df76

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

2020-11-09 Thread Chuan Zheng
this commit is sent and may fix this issue, waiting for review. https://www.mail-archive.com/qemu-devel@nongnu.org/msg758017.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1902470 Title: migrat

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

2020-11-08 Thread Chuan Zheng
** Changed in: qemu Status: Confirmed => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1902470 Title: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

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

2020-11-06 Thread Chuan Zheng
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 finalize. Signed-off-by: Chuan Zheng --- migration/multifd.c | 14 ++ 1 file changed, 14 insertions

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

2020-11-06 Thread Chuan Zheng
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 finalize. Signed-off-by: Chuan Zheng --- migration/multifd.c | 14 ++ 1 file changed, 14 insertions

[PATCH] migration/multifd: fix hangup with TLS-Multifd due to blocking handshake

2020-11-05 Thread Chuan Zheng
... ... ... recvmsg (Blocking I/O waiting for response) recvmsg (Blocking I/O waiting for response) Fix this by offloadinig handshake work to a background thread. Reported-by: Yan Jin Suggested-by: Daniel P. Berrangé Signed-off-by: Chuan Zheng --- migration/multifd.c | 23

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

2020-11-05 Thread Chuan Zheng
** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1902470 Title: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts Status

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

2020-10-29 Thread Chuan Zheng
Remove redundant blank line which is left by Commit 662770af7c6e8c, also take this opportunity to remove redundant includes in dirtyrate.c. Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 5 - 1 file changed, 5 deletions(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c

[PATCH v1 2/4] migration/debug: Implement migration memory consistency check

2020-10-26 Thread Chuan Zheng
Traverse all migratable ramblocks, calculate sha256 for memory consistency check Signed-off-by: Chuan Zheng --- migration/ram.c | 73 + migration/ram.h | 7 ++ 2 files changed, 80 insertions(+) diff --git a/migration/ram.c b

[PATCH v1 1/4] migration/debug: Introduce foreach_migratable_block()

2020-10-26 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/ram.c | 16 1 file changed, 16 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 433489d..aa39908 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -166,6 +166,22 @@ bool ramblock_is_ignored(RAMBlock *block

[PATCH v1 4/4] migration/debug: add DEBUG_MIGRATION_CONSISTENCY_CHECK macros

2020-10-26 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/migration.c | 2 ++ migration/savevm.c| 2 ++ 2 files changed, 4 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index f4434c4..fe2bb3a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1678,7 +1678,9

[PATCH v1 0/4] migration/debug: Add migration ram consistency check

2020-10-26 Thread Chuan Zheng
: b3e0b1026cd4df920884f7d090b90cfb64b4a3ab407feeb632300aabd9fb28fe CheckPoint: qemu_loadvm_state, Ramblock: /rom@etc/acpi/rsdp, CheckValue: 7af8a2bc8c5f78db788a47ed60b30bffee50f28783529ee55224f9e3613cc28a Not for sure if it is valuable, any discussion and comment is welcome. Chuan Zheng (4): migration

[PATCH v1 3/4] migration/debug: add checkpoint for migration consistency check

2020-10-26 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/migration.c | 1 + migration/savevm.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 0575ecb..f4434c4 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1678,6 +1678,7

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

2020-10-16 Thread Chuan Zheng
Multifd RDMA is need to poll when we send data, record it. Signed-off-by: Chuan Zheng --- migration/migration.c | 1 + migration/migration.h | 1 + migration/rdma.c | 14 ++ 3 files changed, 16 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 6 ++ migration/multifd.h | 1 + migration/rdma.c| 16 +++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/migration/multifd.c b/migration/multifd.c index c4d90ef..f548122 100644 --- a/migration/multifd.c

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

2020-10-16 Thread Chuan Zheng
Create multifd_setup_ops for TxRx thread, no logic change. Signed-off-by: Chuan Zheng --- migration/multifd.c | 44 +++- migration/multifd.h | 7 +++ 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/migration/multifd.c b/migration

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 0d494df..8ccfd46 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -580,6 +580,10 @@ void

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/migration.c | 1 + migration/migration.h | 3 +++ migration/rdma.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index be6166a..7061410 100644 --- a/migration/migration.c +++ b/migration

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 4 ++-- migration/multifd.h | 2 ++ migration/rdma.c| 56 + 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 03f3a1e

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

2020-10-16 Thread Chuan Zheng
Add the 'qemu_rdma_registration' function, multifd send threads call it to register memory. Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/migratio

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

2020-10-16 Thread Chuan Zheng
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 --- migration/migration.c | 13 + migration/migration.h | 6 ++ 2 files changed, 19 insertions(+) diff --git a

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

2020-10-16 Thread Chuan Zheng
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 | 70 ++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --

[PATCH v3 09/18] migration/rdma: add multifd_rdma_load_setup() to setup multifd rdma

2020-10-16 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/rdma.c | 52 1 file changed, 52 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index ad4e4ba..2baa933 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -4010,6 +4010,48 @@ static

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 67 +++- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 327f80f..519fa7a 100644 --- a/migration/rdma.c +++ b

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

2020-10-16 Thread Chuan Zheng
both tcp and rdma do not export rdma to avoid multifd code in mess fix build issue for non-rdma fix some codestyle and buggy code Chuan Zheng (18): migration/rdma: add the 'migrate_use_rdma_pin_all' function migration/rdma: judge whether or not the RDMA is used for migrat

[PATCH v3 15/18] migration/rdma: only register the memory for multifd channels

2020-10-16 Thread Chuan Zheng
All data is sent by multifd Channels, so we only register its for multifd channels and main channel don't register its. Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/rdma.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/rdma.c b/migration/r

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

2020-10-16 Thread Chuan Zheng
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 a/migration/qemu-file.c b/migration/qemu-file.c index be21518..37f6201 100644 --- a/migration/qemu-file.c +++ b/migration/qemu

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 3 ++ migration/rdma.c| 94 +++-- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 9439b3c..c4d90ef

[PATCH v3 01/18] migration/rdma: add the 'migrate_use_rdma_pin_all' function

2020-10-16 Thread Chuan Zheng
Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/migration.c | 9 + migration/migration.h | 1 + 2 files changed, 10 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 0575ecb..64ae417 100644 --- a/migration/migration.c +++ b/migration

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

2020-10-16 Thread Chuan Zheng
MultiFDSendParams and MultiFDRecvParams is need for rdma, export it Signed-off-by: Zhimin Feng Signed-off-by: Chuan Zheng --- migration/multifd.c | 26 ++ migration/multifd.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/migration/multifd.c b/migration

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

2020-10-16 Thread Chuan Zheng
Signed-off-by: Chuan Zheng --- migration/multifd.c | 6 migration/multifd.h | 4 +++ migration/rdma.c| 82 + 3 files changed, 92 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 1f82307..0d494df 100644

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

2020-10-16 Thread Chuan Zheng
Note we do want to export any rdma struct, take void * instead. Signed-off-by: Chuan Zheng --- migration/multifd.h | 8 1 file changed, 8 insertions(+) diff --git a/migration/multifd.h b/migration/multifd.h index 2f4e585..ff80bd5 100644 --- a/migration/multifd.h +++ b/migration

[PATCH v2 0/2] migration/dirtyrate: optimizations for showing of querying dirtyrate

2020-09-28 Thread Chuan Zheng
This series include two optimizations showing of dirtyrate against v1 1) show start_time and calc_time when query while at the measuring state 2) do not show dirtyrate when measuring is not finished Chuan Zheng (2): migration/dirtyrate: record start_time and calc_time while at the measuring

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

2020-09-28 Thread Chuan Zheng
suring: {"return":{"status":"measuring","start-time":102931,"calc-time":1},"id":"libvirt-85"} @measured: {"return":{"status":"measured","dirty-rate":4,"start-time":150146,"calc

[PATCH v2 1/2] migration/dirtyrate: record start_time and calc_time while at the measuring state

2020-09-28 Thread Chuan Zheng
Querying could include both the start-time and the calc-time while at the measuring state, allowing a caller to determine when they should expect to come back looking for a result. Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 13 + 1 file changed, 9 insertions(+), 4

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

2020-09-26 Thread Chuan Zheng
easuring: {"return":{"status":"measuring","start-time":0,"calc-time":0},"id":"libvirt-14"} @measured: {"return":{"status":"measured","dirty-rate":4,"start-time":150146,"ca

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

2020-09-15 Thread Chuan Zheng
{"return":{"status":"measured","dirty-rate":374,"start-time":3718293,"calc-time":1},"id":"libvirt-15"} Further test dirtyrate by libvirt api like this: virsh getdirtyrate [vmname] [sleep-time] Chuan Zheng (12): migration/dir

[PATCH v10 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-09-15 Thread Chuan Zheng
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE which is set as 128M. Signed-off-by: Chuan Zheng Reviewed-by: David Edmondson Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 21 + migration/dirtyrate.h

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

2020-09-15 Thread Chuan Zheng
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 +++ 1 file changed, 63 insertions(+) diff --git a/migration

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

2020-09-15 Thread Chuan Zheng
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 Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 109

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

2020-09-15 Thread Chuan Zheng
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 62 +++ qapi/migration.json | 50 + 2 files changed, 112

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

2020-09-15 Thread Chuan Zheng
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 Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 38

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

2020-09-15 Thread Chuan Zheng
Implement calculate_dirtyrate() function. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff

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

2020-09-15 Thread Chuan Zheng
Add dirtyrate statistics functions to record/update dirtyrate info. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 32 migration/dirtyrate.h | 12 2 files changed, 44 insertions

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

2020-09-15 Thread Chuan Zheng
add DirtyRateStatus to denote calculating status. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 26 ++ qapi/migration.json | 17 + 2 files changed, 43 insertions(+) diff --git a

[PATCH v10 09/12] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()

2020-09-15 Thread Chuan Zheng
Implement is_sample_period_valid() to check if the sample period is vaild and do set_sample_page_period() to sleep specific time between sample actions. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c

[PATCH v10 12/12] migration/dirtyrate: Add trace_calls to make it easier to debug

2020-09-15 Thread Chuan Zheng
Add trace_calls to make it easier to debug Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 9 + migration/trace-events | 8 2 files changed, 17 insertions(+) diff --git a/migration/dirtyrate.c b

[PATCH v10 05/12] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h

2020-09-15 Thread Chuan Zheng
RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure, move the existing definition up into migration/ram.h Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 1 + migration/ram.c | 11

[PATCH v10 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-09-15 Thread Chuan Zheng
Add RamblockDirtyInfo to store sampled page info of each ramblock. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/migration

[PATCH v4 4/6] migration/tls: extract cleanup function for common-use

2020-09-14 Thread Chuan Zheng
multifd channel cleanup is need if multifd handshake failed, let's extract it. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin Reviewed-by: Daniel P. Berrangé --- migration/multifd.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --

[PATCH v4 0/6] *** Add Multifd support for TLS migration ***

2020-09-14 Thread Chuan Zheng
| 15.067s | | mempress 1024 200| 48.798s | 25.334s | ++++++++ Chuan Zheng (6): migration/tls: save hostname into Migrati

[PATCH v4 5/6] migration/tls: add support for multifd tls-handshake

2020-09-14 Thread Chuan Zheng
Similar like migration main thread, we need to do handshake for each multifd thread. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin Reviewed-by: Daniel P. Berrangé --- migration/multifd.c | 77 +++-- 1 file changed, 75 insertions(+), 2

[PATCH v4 3/6] migration/tls: add tls_hostname into MultiFDSendParams

2020-09-14 Thread Chuan Zheng
Since multifd creation is async with migration_channel_connect, we should pass the hostname from MigrationState to MultiFDSendParams. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin --- migration/multifd.c | 5 + migration/multifd.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a

[PATCH v4 6/6] migration/tls: add trace points for multifd-tls

2020-09-14 Thread Chuan Zheng
add trace points for multifd-tls for debug. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin Reviewed-by: Daniel P. Berrangé --- migration/multifd.c| 10 +- migration/trace-events | 4 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/migration/multifd.c b

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

2020-09-14 Thread Chuan Zheng
hostname is need in multifd-tls, save hostname into MigrationState. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin --- migration/channel.c | 1 + migration/migration.c | 1 + migration/migration.h | 5 + migration/tls.c | 2 ++ 4 files changed, 9 insertions(+) diff --git a

[PATCH v4 2/6] migration/tls: extract migration_tls_client_create for common-use

2020-09-14 Thread Chuan Zheng
migration_tls_client_create will be used in multifd-tls, let's extract it. Signed-off-by: Chuan Zheng Signed-off-by: Yan Jin Reviewed-by: Daniel P. Berrangé --- migration/tls.c | 26 ++ migration/tls.h | 6 ++ 2 files changed, 24 insertions(+), 8 dele

[PATCH v9 05/12] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h

2020-09-14 Thread Chuan Zheng
RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure, move the existing definition up into migration/ram.h Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 1 + migration/ram.c | 11 +-- migration/ram.h

[PATCH v9 12/12] migration/dirtyrate: Add trace_calls to make it easier to debug

2020-09-14 Thread Chuan Zheng
Add trace_calls to make it easier to debug Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 9 + migration/trace-events | 8 2 files changed, 17 insertions(+) diff --git a/migration/dirtyrate.c b

[PATCH v9 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-09-14 Thread Chuan Zheng
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE which is set as 128M. Signed-off-by: Chuan Zheng Reviewed-by: David Edmondson Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 21 + migration/dirtyrate.h | 5 + 2 files

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

2020-09-14 Thread Chuan Zheng
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 62 +++ qapi/migration.json | 50 + 2 files changed, 112

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

2020-09-14 Thread Chuan Zheng
Add dirtyrate statistics functions to record/update dirtyrate info. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 32 migration/dirtyrate.h | 12 2 files changed, 44 insertions(+) diff --git a/migration

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

2020-09-14 Thread Chuan Zheng
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 +++ 1 file changed, 63 insertions(+) diff --git a/migration

[PATCH v9 09/12] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()

2020-09-14 Thread Chuan Zheng
Implement is_sample_period_valid() to check if the sample period is vaild and do set_sample_page_period() to sleep specific time between sample actions. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 24

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

2020-09-14 Thread Chuan Zheng
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 Reviewed-by: David Edmondson --- migration/dirtyrate.c | 109

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

2020-09-14 Thread Chuan Zheng
add DirtyRateStatus to denote calculating status. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 26 ++ qapi/migration.json | 17 + 2 files changed, 43 insertions(+) diff --git a/migration/dirtyrate.c b

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

2020-09-14 Thread Chuan Zheng
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 Reviewed-by: David Edmondson --- migration/dirtyrate.c | 38 ++ migration/dirtyrate.h | 29

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

2020-09-14 Thread Chuan Zheng
Implement calculate_dirtyrate() function. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/migration

[PATCH v9 00/12] *** A Method for evaluating dirty page rate ***

2020-09-14 Thread Chuan Zheng
me 3. virsh qemu-monitor-command [vmname] '{"execute":"query-dirty-rate"}' The qmp command returns like this: {"return":{"status":"measured","dirty-rate":374,"start-time":3718293,"calc-time":1},"id&qu

[PATCH v9 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-09-14 Thread Chuan Zheng
Add RamblockDirtyInfo to store sampled page info of each ramblock. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/migration/dirtyrate.h b/migration

[PATCH v8 12/12] migration/dirtyrate: Add trace_calls to make it easier to debug

2020-09-14 Thread Chuan Zheng
Add trace_calls to make it easier to debug Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 9 + migration/trace-events | 8 2 files changed, 17 insertions(+) diff --git a/migration/dirtyrate.c b

[PATCH v8 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-09-14 Thread Chuan Zheng
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE which is set as 128M. Signed-off-by: Chuan Zheng Reviewed-by: David Edmondson Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 21 + migration/dirtyrate.h | 5 + 2 files

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

2020-09-14 Thread Chuan Zheng
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 62 +++ qapi/migration.json | 50 + 2 files changed, 112

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

2020-09-14 Thread Chuan Zheng
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 Reviewed-by: David Edmondson --- migration/dirtyrate.c | 111

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

2020-09-14 Thread Chuan Zheng
Add dirtyrate statistics functions to record/update dirtyrate info. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 32 migration/dirtyrate.h | 12 2 files changed, 44 insertions(+) diff --git a/migration

[PATCH v8 00/12] *** A Method for evaluating dirty page rate ***

2020-09-14 Thread Chuan Zheng
easured","dirty-rate":374,"start-time":3718293,"calc-time":1},"id":"libvirt-15"} Further test dirtyrate by libvirt api like this: virsh getdirtyrate [vmname] [sleep-time] Chuan Zheng (12): migration/dirtyrate: setup up query-dirtyrate framwork migra

[PATCH v8 09/12] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()

2020-09-14 Thread Chuan Zheng
Implement is_sample_period_valid() to check if the sample period is vaild and do set_sample_page_period() to sleep specific time between sample actions. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 24

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

2020-09-14 Thread Chuan Zheng
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 +++ 1 file changed, 63 insertions(+) diff --git a/migration

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

2020-09-14 Thread Chuan Zheng
add DirtyRateStatus to denote calculating status. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 26 ++ qapi/migration.json | 17 + 2 files changed, 43 insertions(+) diff --git a/migration/dirtyrate.c b

  1   2   3   >