[PATCH v6 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-04-08 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH v6 05/10] Add a function named packet_new_nocopy for COLO.

2021-04-08 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 25 + net/colo.h| 1 +

[PATCH v6 07/10] Reset the auto-converge counter at every checkpoint.

2021-04-08 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Lukas Straub

[PATCH v6 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-04-08 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub ---

[PATCH v6 08/10] Reduce the PVM stop time during Checkpoint

2021-04-08 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert Reviewed-by:

[PATCH v6 06/10] Add the function of colo_compare_cleanup

2021-04-08 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v6 01/10] Remove some duplicate trace code.

2021-04-08 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git

[PATCH v6 09/10] Add the function of colo_bitmap_clear_dirty

2021-04-08 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. The performance test for COLO as follow: Server configuraton: CPU

[PATCH v6 04/10] Remove migrate_set_block_enabled in checkpoint

2021-04-08 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian

[PATCH v6 03/10] Optimize the function of filter_send

2021-04-08 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub

[PATCH v6 00/10] Fixed some bugs and optimized some codes for COLO

2021-04-08 Thread leirao
From: Rao, Lei Changes since v5: --Replaced g_slice_new calls with g_slice_new0. Changes since v4: --Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD in colo_bitmap_clear_dirty. --Modify some minor issues about variable definition. --Add some performance test

[PATCH v5 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-04-01 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH v5 08/10] Reduce the PVM stop time during Checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert ---

[PATCH v5 05/10] Add a function named packet_new_nocopy for COLO.

2021-04-01 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 23 +++ net/colo.h| 1 +

[PATCH v5 06/10] Add the function of colo_compare_cleanup

2021-04-01 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v5 09/10] Add the function of colo_bitmap_clear_dirty

2021-04-01 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. The performance test for COLO as follow: Server configuraton: CPU

[PATCH v5 04/10] Remove migrate_set_block_enabled in checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian ---

[PATCH v5 03/10] Optimize the function of filter_send

2021-04-01 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/filter-mirror.c | 8 1 file changed, 4

[PATCH v5 07/10] Reset the auto-converge counter at every checkpoint.

2021-04-01 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 4

[PATCH v5 01/10] Remove some duplicate trace code.

2021-04-01 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9d1ad99..c142c08 100644 ---

[PATCH v5 00/10] Fixed some bugs and optimized some codes for COLO

2021-04-01 Thread leirao
From: Rao,Lei Changes since v4: --Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD in colo_bitmap_clear_dirty. --Modify some minor issues about variable definition. --Add some performance test data in the commit message. Changes since v3: --Remove

[PATCH v5 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-04-01 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c

[PATCH v4 09/10] Add the function of colo_bitmap_clear_diry.

2021-03-24 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29

[PATCH v4 05/10] Add a function named packet_new_nocopy for COLO.

2021-03-24 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 23 +++ net/colo.h| 1 +

[PATCH v4 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-24 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian ---

[PATCH v4 06/10] Add the function of colo_compare_cleanup

2021-03-24 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v4 08/10] Reduce the PVM stop time during Checkpoint

2021-03-24 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 45

[PATCH v4 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-24 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c

[PATCH v4 03/10] Optimize the function of filter_send

2021-03-24 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/filter-mirror.c | 8 1 file changed, 4

[PATCH v4 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-24 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH v4 07/10] Reset the auto-converge counter at every checkpoint.

2021-03-24 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao Reviewed-by: Dr. David Alan Gilbert --- migration/colo.c | 4

[PATCH v4 01/10] Remove some duplicate trace code.

2021-03-24 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9d1ad99..c142c08 100644 ---

[PATCH v4 00/10] Fixed some bugs and optimized some codes for COLO

2021-03-24 Thread leirao
From: Rao, Lei Changes since v3: --Remove cpu_throttle_stop from mig_throttle_counter_reset. Changes since v2: --Add a function named packet_new_nocopy. --Continue to optimize the function of colo_flush_ram_cache. Changes since v1: --Reset the state of the

[PATCH v3 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-18 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH v3 05/10] Add a function named packet_new_nocopy for COLO.

2021-03-18 Thread leirao
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo.c| 23 +++ net/colo.h| 1 +

[PATCH v3 09/10] Add the function of colo_bitmap_clear_diry.

2021-03-18 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29

[PATCH v3 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian ---

[PATCH v3 08/10] Reduce the PVM stop time during Checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 45

[PATCH v3 06/10] Add the function of colo_compare_cleanup

2021-03-18 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v3 03/10] Optimize the function of filter_send

2021-03-18 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/filter-mirror.c | 8 1 file changed, 4

[PATCH v3 07/10] Reset the auto-converge counter at every checkpoint.

2021-03-18 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao --- migration/colo.c | 4 migration/ram.c | 10

[PATCH v3 01/10] Remove some duplicate trace code.

2021-03-18 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 84db497..9e18baa 100644 ---

[PATCH v3 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-18 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c

[PATCH v3 00/10] Fixed some bugs and optimized some codes for COLO

2021-03-18 Thread leirao
From: Rao, Lei Changes since v2: --Add a function named packet_new_nocopy. --Continue to optimize the function of colo_flush_ram_cache. Changes since v1: --Reset the state of the auto-converge counters at every checkpoint instead of directly disabling. --Treat

[PATCH v2 07/10] Reset the auto-converge counter at every checkpoint.

2021-03-11 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao --- migration/colo.c | 4 migration/ram.c | 10

[PATCH v2 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-11 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH v2 05/10] Optimize the function of packet_new

2021-03-11 Thread leirao
From: "Rao, Lei" if we put the data copy outside the packet_new(), then for the filter-rewrite module, there will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo-compare.c| 7 +-- net/colo.c| 4 ++-- net/colo.h

[PATCH v2 09/10] Add the function of colo_bitmap_clear_diry

2021-03-11 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29

[PATCH v2 06/10] Add the function of colo_compare_cleanup

2021-03-11 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v2 03/10] Optimize the function of filter_send

2021-03-11 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao --- net/filter-mirror.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 08/10] Reduce the PVM stop time during Checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 44

[PATCH v2 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen --- migration/colo.c | 6

[PATCH v2 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index

[PATCH v2 00/10] Fixed some bugs and optimized some codes for COLO.

2021-03-11 Thread leirao
Changes since v1: --Reset the state of the auto-converge counters at every checkpoint instead of directly disabling. --Treat the filter_send function returning zero as a normal case. The series of patches include: Fixed some bugs of qemu crash. Optimized some code

[PATCH v2 01/10] Remove some duplicate trace code.

2021-03-11 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 84db497..9e18baa 100644 --- a/net/colo-compare.c +++

[PATCH 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-01-12 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of

[PATCH 09/10] Add the function of colo_bitmap_clear_diry

2021-01-12 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29

[PATCH 08/10] Reduce the PVM stop time during Checkpoint

2021-01-12 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 44

[PATCH 04/10] Remove migrate_set_block_enabled in checkpoint

2021-01-12 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen --- migration/colo.c | 6

[PATCH 03/10] Optimize the function of filter_send

2021-01-12 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao --- net/filter-mirror.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 06/10] Add the function of colo_compare_cleanup

2021-01-12 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH 05/10] Optimize the function of packet_new

2021-01-12 Thread leirao
From: "Rao, Lei" if we put the data copy outside the packet_new(), then for the filter-rewrite module, there will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo-compare.c| 7 +-- net/colo.c| 4 ++-- net/colo.h

[PATCH 00/10] Fixed some bugs and optimized some codes for COLO

2021-01-12 Thread leirao
The series of patches include: Fixed some bugs of qemu crash. Optimized some code to reduce the time of checkpoint. Remove some unnecessary code to improve COLO. Rao, Lei (10): Remove some duplicate trace code. Fix the qemu crash when guest shutdown during checkpoint

[PATCH 07/10] Disable auto-coverge before entering COLO mode.

2021-01-12 Thread leirao
From: "Rao, Lei" If we don't disable the feature of auto-converge for live migration before entering COLO mode, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao ---

[PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-01-12 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index

[PATCH 01/10] Remove some duplicate trace code.

2021-01-12 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 84db497..9e18baa 100644 --- a/net/colo-compare.c +++

[PATCH v2 3/3] Fix the qemu crash when guest shutdown in COLO mode

2020-09-22 Thread leirao
undefined in runstate_transitions_def, we should add it. This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'shutdown' -> 'colo' Aborted Signed-off-by: leirao --- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/vl.c b/softmmu/vl.c index f7b

[PATCH v2 2/3] Reduce the time of checkpoint for COLO

2020-09-22 Thread leirao
we should set ram_bulk_stage to false after ram_state_init, otherwise the bitmap will be unused in migration_bitmap_find_dirty. all pages in ram cache will be flushed to the ram of secondary guest for each checkpoint. Signed-off-by: leirao --- migration/ram.c | 14 +- 1 file changed

[PATCH v2 0/3] Optimized some code for COLO

2020-09-22 Thread leirao
Optimized some code for COLO and fixed a qemu crash when guest shutdown in COLO mode. leirao (3): Optimize seq_sorter function for colo-compare Reduce the time of checkpoint for COLO Fix the qemu crash when guest shutdown in COLO mode migration/ram.c| 14 +- net/colo

[PATCH v2 1/3] Optimize seq_sorter function for colo-compare

2020-09-22 Thread leirao
The seq of tcp has been filled in fill_pkt_tcp_info, it can be used directly here. Signed-off-by: leirao --- net/colo-compare.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 3a45d64..86980ce 100644 --- a/net/colo-compare.c

[PATCH 3/3] Fix the qemu crash when guest shutdown in COLO mode

2020-09-19 Thread leirao
undefined in runstate_transitions_def, we should add it. This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'shutdown' -> 'colo' Aborted Signed-off-by: leirao --- softmmu/vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/vl.c b/softmmu/vl.c index f7b

[PATCH 2/3] Reduce the time of checkpoint for COLO

2020-09-19 Thread leirao
we should set ram_bulk_stage to false after ram_state_init, otherwise the bitmap will be unused in migration_bitmap_find_dirty. all pages in ram cache will be flushed to the ram of secondary guest for each checkpoint. Signed-off-by: leirao --- migration/ram.c | 12 1 file changed

[PATCH 1/3] Optimize seq_sorter function for colo-compare

2020-09-19 Thread leirao
The seq of tcp has been filled in fill_pkt_tcp_info, it can be used directly here. Signed-off-by: leirao --- net/colo-compare.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 3a45d64..86980ce 100644 --- a/net/colo-compare.c

[PATCH 0/3] Optimized some code for COLO

2020-09-19 Thread leirao
Optimized some code for COLO and fixed a qemu crash when guest shutdown in COLO mode. leirao (3): Optimize seq_sorter function for colo-compare Reduce the time of checkpoint for COLO Fix the qemu crash when guest shutdown in COLO mode migration/ram.c| 12 net/colo