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 decrease the response of service.
This patch drops the packet firstly. Then, send all queued primary
packets, remove all queued secondary packets (flush packets) and
do checkpoint.
Please help to review, thanks.
V4:
- Remove redundant flush of packets
V3:
- handling of the full primary or secondary queue according to the
suggestion from 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 | 62 ++++++++++++++++++++++++++++++++--------------
1 file changed, 43 insertions(+), 19 deletions(-)
--
2.17.1