mbox series

[v3,0/2] COLO: handling of the full primary or secondary queue

Message ID 20200325094354.19677-1-dereksu@qnap.com
Headers show
Series COLO: handling of the full primary or secondary queue | expand

Message

Derek Su March 25, 2020, 9:43 a.m. UTC
The series is to handle the full primary or secondary queue in colo-compare.

(1) fix the "pkt" memory leak in packet_enqueue().
    Reproduce steps:
    1. Setup PVM and SVM both with NIC e1000 by the steps descripted
       in the wiki qemu/COLO
    2. Run "iperf3 -s" in PVM
    3. Run "iperf3 -c <PVM-IP> -t 7200" in client

    The memory usage of qemu-system-x86_64 increases as the PVM's QMP 
    shows "qemu-system-x86_64: colo compare secondary queue size too big,
    drop packet".

(2) The pervious handling of the full primary or queue is only dropping
    the packet. If there are lots of clients to the guest VM,
    the "drop" will lead to the lost of the networking connection
    until next checkpoint, and therefore slow down the service.

    This patch drops the packet firstly. Then, send all queued primary
    packets, remove all queued secondary packets and do checkpoint.

Please review, thanks.

V3:
 - handling of the full primary or secondary queue according to the
   suggestion Zhang Chen
V2:
 - Fix incorrect patch format

Derek Su (2):
  net/colo-compare.c: Fix memory leak in packet_enqueue()
  net/colo-compare.c: handling of the full primary or secondary queue

 net/colo-compare.c | 64 ++++++++++++++++++++++++++++++++--------------
 1 file changed, 45 insertions(+), 19 deletions(-)