colo-compare: Fix memory leak for non-tcp packet
cover colo-compare: Fix memory leak for non-tcp packet
Hello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.
Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packet net/colo-compare.c: Optimize removal of secondary packet
net/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
--
2.20.1
PATCH 1/2 net/colo-compare.c: Fix memory leak for non-tcp packet
Additional to removing the packet from the secondary queue, we also need to free it.
--- net/colo-compare.c | 1 + 1 file changed, 1 insertion(+)
net/colo-compare.c +1 -0
@@ -690,6 +690,7 @@ static void colo_compare_packet(CompareState *s, Connection *conn,if (result) {colo_release_primary_pkt (s, pkt); +packet_destroy (result->data,NULL );g_queue_remove (&conn->secondary_list, result->data); }else {/*
--
2.20.1
RE: [PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp packet
Quoted 11 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 1/2]net/colo-compare.c: Fix memory leak for non-tcp packet
Quoted 4 lines
Additional to removing the packet from the secondary queue, we also need to free it.
Signed-off-by Lukas Straub <[email protected]>
Looks good to me.
Thanks
Chen
Quoted 19 lines
--- net/colo-compare.c | 1 + 1 file changed, 1 insertion(+)net/colo-compare.c index renamed from net/colo-compare.c +0
-0
337025b44f..eed0fbb27b100644net/colo-compare.c +1
-0@@ -690,6 +690,7 @@ static void colo_compare_packet(CompareState *s,Connection *conn, if (result) {colo_release_primary_pkt (s ,pkt ); +packet_destroy (result->data,NULL );g_queue_remove (&conn->secondary_list, result->data); } else {/*--
2.20.1
PATCH 2/2 net/colo-compare.c: Optimize removal of secondary packet
In reply to Lukas Straubg_queue_remove needs to look up the list entry first, but we already have it as result and can remove it directly with g_queue_delete_link.
--- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/colo-compare.c +1 -1
@@ -691,7 +691,7 @@ static void colo_compare_packet(CompareState *s, Connection *conn,if (result) {colo_release_primary_pkt (s, pkt);packet_destroy (result->data,NULL ); -g_queue_remove (&conn->secondary_list, result->data); +g_queue_delete_link (&conn->secondary_list, result); }else {/* * If one packet arrive late, the secondary_list or
--
2.20.1
RE: [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet
Quoted 11 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 2/2]net/colo-compare.c: Optimize removal of secondary packet
Quoted 4 lines
g_queue_removeneeds to look up the list entry first, but we already have it as result and can remove it directly withg_queue_delete_link.Signed-off-by Lukas Straub <[email protected]>
Thanks
Chen
Quoted 20 lines
--- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/colo-compare.c index renamed from net/colo-compare.c +0
-0
eed0fbb27b..4e2af8ff00100644net/colo-compare.c +1
-1@@ -691,7 +691,7 @@ static void colo_compare_packet(CompareState *s,Connection *conn, if (result) {colo_release_primary_pkt (s ,pkt );packet_destroy (result->data,NULL ); -g_queue_remove (&conn->secondary_list, result->data); +g_queue_delete_link (&conn->secondary_list, result); } else {/* * If one packet arrive late, the
secondary_listor
--
2.20.1
Zhang, Chen
AppliedQueued this series to COLO tree.
Thanks
Chen
Quoted 21 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packetnet/colo-compare.c: Optimize removal of secondary packetnet/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)--
2.20.1
Hi,
This hasn't been merged yet.
Regards,
Lukas Straub
Quoted 26 lines · Chen
Queued this series to COLO tree.
Thanks
ChenQuoted 21 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packetnet/colo-compare.c: Optimize removal of secondary packetnet/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)--
2.20.1
Sorry for the delay. Current COLO tree just merged this series,
I originally wanted to merge other COLO related patches(Lei or me) and submit it together to Jason.
Hi Jason, do you need me to send this series first or do you want to do it together?
Thanks
Chen
Quoted 48 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Thursday, March 18, 2021 5:24 AM
To: Zhang, Chen <[email protected]>
Cc: qemu-devel <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHi,
This hasn't been merged yet.Regards,
Lukas StraubQuoted 27 lines · Chen
Queued this series to COLO tree.
Thanks
ChenQuoted 22 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packetnet/colo-compare.c: Optimize removal of secondary packetnet/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)--
2.20.1--
Quoted 4 lines · Chen
Sorry for the delay. Current COLO tree just merged this series,
I originally wanted to merge other COLO related patches(Lei or me) and submit it together to Jason.Hi Jason, do you need me to send this series first or do you want to do it together?
We're in soft freeze, so if you can collect all the patches before hard free, that would be better.
Thanks
Quoted 51 lines
Thanks
ChenQuoted 47 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Thursday, March 18, 2021 5:24 AM
To: Zhang, Chen <[email protected]>
Cc: qemu-devel <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHi,
This hasn't been merged yet.Regards,
Lukas StraubQuoted 27 lines · Chen
Queued this series to COLO tree.
Thanks
ChenQuoted 22 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packetnet/colo-compare.c: Optimize removal of secondary packetnet/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)--
2.20.1--
Quoted 15 lines
-----Original Message-----
From: Jason Wang <[email protected]>
Sent: Thursday, March 18, 2021 10:41 AM
To: Zhang, Chen <[email protected]>; Lukas Straub <[email protected]>
Cc: qemu-devel <[email protected]>; Li Zhijian <[email protected]>
Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetQuoted 2 lines · Chen
Sorry for the delay. Current COLO tree just merged this series, I originally wanted to merge other COLO related patches(Lei or me) and
Quoted 9 lines
submit it together to Jason.
Quoted 2 lines
Hi Jason, do you need me to send this series first or do you want to do it
together?
We're in soft freeze, so if you can collect all the patches before hard free, that would be better.
OK, I will send this series first.
Thanks
Chen
Quoted 55 lines
Thanks
Quoted 52 lines
Thanks
ChenQuoted 48 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Thursday, March 18, 2021 5:24 AM
To: Zhang, Chen <[email protected]>
Cc: qemu-devel <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHi,
This hasn't been merged yet.Regards,
Lukas StraubQuoted 27 lines · Chen
Queued this series to COLO tree.
Thanks
ChenQuoted 22 lines
-----Original Message-----
From: Lukas Straub <[email protected]>
Sent: Sunday, November 15, 2020 7:19 PM
To: qemu-devel <[email protected]>
Cc: Zhang, Chen <[email protected]>; Li Zhijian <[email protected]>; Jason Wang <[email protected]>
Subject: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packetHello Everyone,
This fixes a memory leak for non-tcp packets and optimizes the removal from the queue.Lukas Straub (2):
net/colo-compare.c: Fix memory leak for non-tcp packetnet/colo-compare.c: Optimize removal of secondary packetnet/colo-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)--
2.20.1--