Optimize COLO related codes and description
cover Optimize COLO related codes and description
From: Zhang Chen <[email protected]>
In this series we optimize codes and fix some tiny issues.
Zhang Chen (3):
migration/colo.c: Remove redundant input parameter migration/colo.h: Remove obsolete codes qemu-option.hx: Update missed parameter for colo-compare
include/migration/colo.h | 4 +--- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- qemu-options.hx | 9 ++++++--- 4 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.GIT
PATCH 1/3 migration/colo.c: Remove redundant input parameter
From: Zhang Chen <[email protected]>
The colo_do_failover no need the input parameter.
--- include/migration/colo.h | 2 +- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
include/migration/colo.h +1 -1
@@ -37,7 +37,7 @@ bool migration_incoming_in_colo_state(void);COLOMode get_colo_mode (void );/* failover */ -void colo_do_failover (MigrationState *s); +void colo_do_failover (void );void colo_checkpoint_notify (void *opaque);#endif
migration/colo-failover.c +1 -1
@@ -39,7 +39,7 @@ static void colo_failover_bh(void *opaque)return ; } -colo_do_failover (NULL ); +colo_do_failover (); }void failover_request_active (Error **errp)
migration/colo.c +1 -1
@@ -193,7 +193,7 @@ COLOMode get_colo_mode(void) } } -void colo_do_failover (MigrationState *s) +void colo_do_failover (void ) {/* Make sure VM stopped while failover happened. */ if (!colo_runstate_is_stopped ()) {
Signature · 1 line
2.17.GIT
Re: [Qemu-devel] [PATCH 1/3] migration/colo.c: Remove redundant input parameter
Quoted 5 lines · * Zhang Chen ([email protected]) wrote:
From: Zhang Chen <[email protected]>
The
colo_do_failoverno need the input parameter.Signed-off-by Zhang Chen <[email protected]>
Quoted 48 lines
--- include/migration/colo.h | 2 +- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)include/migration/colo.h +1
-1@@ -37,7 +37,7 @@ bool migration_incoming_in_colo_state(void);COLOMode get_colo_mode (void );/* failover */ -void colo_do_failover (MigrationState *s); +void colo_do_failover (void );void colo_checkpoint_notify (void *opaque);#endif migration/colo-failover.c +1
-1@@ -39,7 +39,7 @@ static void colo_failover_bh(void *opaque)return ; } -colo_do_failover (NULL ); +colo_do_failover (); }void failover_request_active (Error **errp)migration/colo.c +1
-1@@ -193,7 +193,7 @@ COLOMode get_colo_mode(void) } } -void colo_do_failover (MigrationState *s) +void colo_do_failover (void ) {/* Make sure VM stopped while failover happened. */ if (!colo_runstate_is_stopped ()) {Signature · 1 line
2.17.GIT
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH 2/3 migration/colo.h: Remove obsolete codes
In reply to Zhang ChenFrom: Zhang Chen <[email protected]>
--- include/migration/colo.h | 2 -- 1 file changed, 2 deletions(-)
include/migration/colo.h +0 -2
@@ -22,8 +22,6 @@ enum colo_event { COLO_EVENT_FAILOVER, }; -void colo_info_init (void ); -void migrate_start_colo_process (MigrationState *s);bool migration_in_colo_state (void );
Signature · 1 line
2.17.GIT
Re: [Qemu-devel] [PATCH 2/3] migration/colo.h: Remove obsolete codes
Quoted 3 lines · * Zhang Chen ([email protected]) wrote:
From: Zhang Chen <[email protected]>
Signed-off-by Zhang Chen <[email protected]>
Quoted 20 lines
--- include/migration/colo.h | 2 -- 1 file changed, 2 deletions(-)include/migration/colo.h +0
-2@@ -22,8 +22,6 @@ enum colo_event { COLO_EVENT_FAILOVER, }; -void colo_info_init (void ); -void migrate_start_colo_process (MigrationState *s);bool migration_in_colo_state (void );Signature · 1 line
2.17.GIT
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
PATCH 3/3 qemu-option.hx: Update missed parameter for colo-compare
In reply to Zhang ChenFrom: Zhang Chen <[email protected]>
We missed the iothread related args in this file.
This patch is used to fix this issue.
--- qemu-options.hx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
qemu-options.hx +6 -3
@@ -4420,13 +4420,15 @@ Dump the network traffic on netdev @var{dev} to the file specified by The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. -@item -object colo-compare,id=@var{id},primary_in=@var{chardevid},secondary_in=@var{chardevid},outdev=@var{chardevid}[,vnet_hdr_support] +@item -object colo-compare,id=@var{id},primary_in=@var{chardevid},secondary_in=@var{chardevid},outdev=@var{chardevid},iothread=@var{id}[,vnet_hdr_support] Colo-compare gets packet from primary_in@var{chardevid} and secondary_in@var{chardevid}, than compare primary packet with secondary packet. If the packets are same, we will output primary packet to outdev@var{chardevid}, else we will notify colo-frame do checkpoint and send primary packet to outdev@var{chardevid}. -if it has the vnet_hdr_support flag, colo compare will send/recv packet with vnet_hdr_len. +In order to improve efficiency, we need to put the task of comparison +in another thread. If it has the vnet_hdr_support flag, colo compare +will send/recv packet with vnet_hdr_len. we must use it with the help of filter-mirror and filter-redirector.
@@ -4441,10 +4443,11 @@ primary: -chardev socket,id=compare0-0,host=3.3.3.3,port=9001 -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait -chardev socket,id=compare_out0,host=3.3.3.3,port=9005 +-object iothread,id=iothread1 -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0 -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0 --object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0 +-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,iothread=iothread1 secondary: -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
Signature · 1 line
2.17.GIT
Re: [Qemu-devel] [PATCH 3/3] qemu-option.hx: Update missed parameter for colo-compare
Quoted 6 lines · * Zhang Chen ([email protected]) wrote:
From: Zhang Chen <[email protected]>
We missed the iothread related args in this file.
This patch is used to fix this issue.Signed-off-by Zhang Chen <[email protected]>
OK.
Quoted 42 lines
--- qemu-options.hx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)qemu-options.hx +6
-3@@ -4420,13 +4420,15 @@ Dump the network traffic on netdev @var{dev} to the file specified by The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. -@item -object colo-compare,id=@var{id},primary_in=@var{chardevid},secondary_in=@var{chardevid},outdev=@var{chardevid}[,vnet_hdr_support] +@item -object colo-compare,id=@var{id},primary_in=@var{chardevid},secondary_in=@var{chardevid},outdev=@var{chardevid},iothread=@var{id}[,vnet_hdr_support] Colo-compare gets packet from primary_in@var{chardevid} and secondary_in@var{chardevid}, than compare primary packet with secondary packet. If the packets are same, we will output primary packet to outdev@var{chardevid}, else we will notify colo-frame do checkpoint and send primary packet to outdev@var{chardevid}. -if it has the vnet_hdr_support flag, colo compare will send/recv packet with vnet_hdr_len. +In order to improve efficiency, we need to put the task of comparison +in another thread. If it has the vnet_hdr_support flag, colo compare +will send/recv packet with vnet_hdr_len. we must use it with the help of filter-mirror and filter-redirector.@@ -4441,10 +4443,11 @@ primary: -chardev socket,id=compare0-0,host=3.3.3.3,port=9001 -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait -chardev socket,id=compare_out0,host=3.3.3.3,port=9005 +-object iothread,id=iothread1 -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0 -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0 --object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0 +-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,iothread=iothread1 secondary: -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdownSignature · 1 line
2.17.GIT
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Hi Dave,
I noticed that you have reviewed all the patches in this series, can you queue it?
Thanks
Zhang Chen
Quoted 27 lines
-----Original Message-----
From: Zhang, Chen
Sent: Friday, April 26, 2019 5:07 PM
To: Laurent Vivier <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Juan Quintela <[email protected]>; zhanghailiang <[email protected]>; Markus Armbruster <[email protected]>; qemu-dev <[email protected]>
Cc: Zhang Chen <[email protected]>; Zhang, Chen <[email protected]>
Subject: [PATCH 0/3] Optimize COLO related codes and descriptionFrom: Zhang Chen <[email protected]>
In this series we optimize codes and fix some tiny issues.
Zhang Chen (3):
migration/colo.c: Remove redundant input parametermigration/colo.h: Remove obsolete codes qemu-option.hx: Update missed parameter for colo-compareinclude/migration/colo.h | 4 +--- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- qemu-options.hx | 9 ++++++--- 4 files changed, 9 insertions(+), 8 deletions(-)--
2.17.GIT
Quoted 3 lines · * Zhang, Chen ([email protected]) wrote:
Hi Dave,
I noticed that you have reviewed all the patches in this series, can you queue it?
Yes, I'm about to start a migration pull now.
Dave
Quoted 32 lines
Thanks
Zhang ChenQuoted 27 lines
-----Original Message-----
From: Zhang, Chen
Sent: Friday, April 26, 2019 5:07 PM
To: Laurent Vivier <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Juan Quintela <[email protected]>; zhanghailiang <[email protected]>; Markus Armbruster <[email protected]>; qemu-dev <[email protected]>
Cc: Zhang Chen <[email protected]>; Zhang, Chen <[email protected]>
Subject: [PATCH 0/3] Optimize COLO related codes and descriptionFrom: Zhang Chen <[email protected]>
In this series we optimize codes and fix some tiny issues.
Zhang Chen (3):
migration/colo.c: Remove redundant input parametermigration/colo.h: Remove obsolete codes qemu-option.hx: Update missed parameter for colo-compareinclude/migration/colo.h | 4 +--- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- qemu-options.hx | 9 ++++++--- 4 files changed, 9 insertions(+), 8 deletions(-)--
2.17.GIT
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 3 lines · * Zhang Chen ([email protected]) wrote:
From: Zhang Chen <[email protected]>
In this series we optimize codes and fix some tiny issues.
Queued
Quoted 6 lines
Zhang Chen (3):
migration/colo.c: Remove redundant input parametermigration/colo.h: Remove obsolete codes qemu-option.hx: Update missed parameter for colo-compare
Quoted 10 lines
include/migration/colo.h | 4 +--- migration/colo-failover.c | 2 +- migration/colo.c | 2 +- qemu-options.hx | 9 ++++++--- 4 files changed, 9 insertions(+), 8 deletions(-)Signature · 1 line
2.17.GIT
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK