* [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet @ 2020-11-15 11:18 Lukas Straub 2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Lukas Straub @ 2020-11-15 11:18 UTC (permalink / raw) To: qemu-devel; +Cc: Zhang Chen, Jason Wang, Li Zhijian [-- Attachment #1: Type: text/plain, Size: 339 bytes --] 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 [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp packet 2020-11-15 11:18 [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Lukas Straub @ 2020-11-15 11:19 ` Lukas Straub 2020-11-16 7:31 ` Zhang, Chen 2020-11-15 11:19 ` [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet Lukas Straub 2020-11-16 7:32 ` [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Zhang, Chen 2 siblings, 1 reply; 10+ messages in thread From: Lukas Straub @ 2020-11-15 11:19 UTC (permalink / raw) To: qemu-devel; +Cc: Zhang Chen, Jason Wang, Li Zhijian [-- Attachment #1: Type: text/plain, Size: 679 bytes --] Additional to removing the packet from the secondary queue, we also need to free it. Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- net/colo-compare.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index 337025b44f..eed0fbb27b 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -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 [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH 1/2] net/colo-compare.c: Fix memory leak for non-tcp packet 2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub @ 2020-11-16 7:31 ` Zhang, Chen 0 siblings, 0 replies; 10+ messages in thread From: Zhang, Chen @ 2020-11-16 7:31 UTC (permalink / raw) To: Lukas Straub, qemu-devel; +Cc: Jason Wang, Li Zhijian > -----Original Message----- > From: Lukas Straub <lukasstraub2@web.de> > Sent: Sunday, November 15, 2020 7:19 PM > To: qemu-devel <qemu-devel@nongnu.org> > Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > Subject: [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. > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> Looks good to me. Reviewed-by: Zhang Chen <chen.zhang@intel.com> Thanks Chen > --- > net/colo-compare.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/colo-compare.c b/net/colo-compare.c index > 337025b44f..eed0fbb27b 100644 > --- a/net/colo-compare.c > +++ b/net/colo-compare.c > @@ -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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet 2020-11-15 11:18 [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Lukas Straub 2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub @ 2020-11-15 11:19 ` Lukas Straub 2020-11-16 7:31 ` Zhang, Chen 2020-11-16 7:32 ` [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Zhang, Chen 2 siblings, 1 reply; 10+ messages in thread From: Lukas Straub @ 2020-11-15 11:19 UTC (permalink / raw) To: qemu-devel; +Cc: Zhang Chen, Jason Wang, Li Zhijian [-- Attachment #1: Type: text/plain, Size: 879 bytes --] g_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. Signed-off-by: Lukas Straub <lukasstraub2@web.de> --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index eed0fbb27b..4e2af8ff00 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -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 [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet 2020-11-15 11:19 ` [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet Lukas Straub @ 2020-11-16 7:31 ` Zhang, Chen 0 siblings, 0 replies; 10+ messages in thread From: Zhang, Chen @ 2020-11-16 7:31 UTC (permalink / raw) To: Lukas Straub, qemu-devel; +Cc: Jason Wang, Li Zhijian > -----Original Message----- > From: Lukas Straub <lukasstraub2@web.de> > Sent: Sunday, November 15, 2020 7:19 PM > To: qemu-devel <qemu-devel@nongnu.org> > Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > Subject: [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary > packet > > g_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. > > Signed-off-by: Lukas Straub <lukasstraub2@web.de> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Thanks Chen > --- > net/colo-compare.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/colo-compare.c b/net/colo-compare.c index > eed0fbb27b..4e2af8ff00 100644 > --- a/net/colo-compare.c > +++ b/net/colo-compare.c > @@ -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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet 2020-11-15 11:18 [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Lukas Straub 2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub 2020-11-15 11:19 ` [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet Lukas Straub @ 2020-11-16 7:32 ` Zhang, Chen 2021-03-17 21:23 ` Lukas Straub 2 siblings, 1 reply; 10+ messages in thread From: Zhang, Chen @ 2020-11-16 7:32 UTC (permalink / raw) To: Lukas Straub, qemu-devel; +Cc: Jason Wang, Li Zhijian Queued this series to COLO tree. Thanks Chen > -----Original Message----- > From: Lukas Straub <lukasstraub2@web.de> > Sent: Sunday, November 15, 2020 7:19 PM > To: qemu-devel <qemu-devel@nongnu.org> > Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > Subject: [PATCH 0/2] 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet 2020-11-16 7:32 ` [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Zhang, Chen @ 2021-03-17 21:23 ` Lukas Straub 2021-03-18 1:22 ` Zhang, Chen 0 siblings, 1 reply; 10+ messages in thread From: Lukas Straub @ 2021-03-17 21:23 UTC (permalink / raw) To: Zhang, Chen; +Cc: Jason Wang, qemu-devel, Li Zhijian [-- Attachment #1: Type: text/plain, Size: 984 bytes --] Hi, This hasn't been merged yet. Regards, Lukas Straub On Mon, 16 Nov 2020 07:32:22 +0000 "Zhang, Chen" <chen.zhang@intel.com> wrote: > Queued this series to COLO tree. > > Thanks > Chen > > > -----Original Message----- > > From: Lukas Straub <lukasstraub2@web.de> > > Sent: Sunday, November 15, 2020 7:19 PM > > To: qemu-devel <qemu-devel@nongnu.org> > > Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > > Subject: [PATCH 0/2] 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 -- [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet 2021-03-17 21:23 ` Lukas Straub @ 2021-03-18 1:22 ` Zhang, Chen 2021-03-18 2:41 ` Jason Wang 0 siblings, 1 reply; 10+ messages in thread From: Zhang, Chen @ 2021-03-18 1:22 UTC (permalink / raw) To: Lukas Straub, Jason Wang; +Cc: qemu-devel, Li Zhijian 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 > -----Original Message----- > From: Lukas Straub <lukasstraub2@web.de> > Sent: Thursday, March 18, 2021 5:24 AM > To: Zhang, Chen <chen.zhang@intel.com> > Cc: qemu-devel <qemu-devel@nongnu.org>; Li Zhijian > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet > > Hi, > This hasn't been merged yet. > > Regards, > Lukas Straub > > On Mon, 16 Nov 2020 07:32:22 +0000 > "Zhang, Chen" <chen.zhang@intel.com> wrote: > > > Queued this series to COLO tree. > > > > Thanks > > Chen > > > > > -----Original Message----- > > > From: Lukas Straub <lukasstraub2@web.de> > > > Sent: Sunday, November 15, 2020 7:19 PM > > > To: qemu-devel <qemu-devel@nongnu.org> > > > Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > > > <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > > > Subject: [PATCH 0/2] 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 > > > > -- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet 2021-03-18 1:22 ` Zhang, Chen @ 2021-03-18 2:41 ` Jason Wang 2021-03-18 3:26 ` Zhang, Chen 0 siblings, 1 reply; 10+ messages in thread From: Jason Wang @ 2021-03-18 2:41 UTC (permalink / raw) To: Zhang, Chen, Lukas Straub; +Cc: qemu-devel, Li Zhijian 在 2021/3/18 上午9:22, Zhang, 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 > > Thanks > Chen > >> -----Original Message----- >> From: Lukas Straub <lukasstraub2@web.de> >> Sent: Thursday, March 18, 2021 5:24 AM >> To: Zhang, Chen <chen.zhang@intel.com> >> Cc: qemu-devel <qemu-devel@nongnu.org>; Li Zhijian >> <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> >> Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet >> >> Hi, >> This hasn't been merged yet. >> >> Regards, >> Lukas Straub >> >> On Mon, 16 Nov 2020 07:32:22 +0000 >> "Zhang, Chen" <chen.zhang@intel.com> wrote: >> >>> Queued this series to COLO tree. >>> >>> Thanks >>> Chen >>> >>>> -----Original Message----- >>>> From: Lukas Straub <lukasstraub2@web.de> >>>> Sent: Sunday, November 15, 2020 7:19 PM >>>> To: qemu-devel <qemu-devel@nongnu.org> >>>> Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian >>>> <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> >>>> Subject: [PATCH 0/2] 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 >> >> >> -- ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet 2021-03-18 2:41 ` Jason Wang @ 2021-03-18 3:26 ` Zhang, Chen 0 siblings, 0 replies; 10+ messages in thread From: Zhang, Chen @ 2021-03-18 3:26 UTC (permalink / raw) To: Jason Wang, Lukas Straub; +Cc: qemu-devel, Li Zhijian > -----Original Message----- > From: Jason Wang <jasowang@redhat.com> > Sent: Thursday, March 18, 2021 10:41 AM > To: Zhang, Chen <chen.zhang@intel.com>; Lukas Straub > <lukasstraub2@web.de> > Cc: qemu-devel <qemu-devel@nongnu.org>; Li Zhijian > <lizhijian@cn.fujitsu.com> > Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet > > > 在 2021/3/18 上午9:22, Zhang, 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. > OK, I will send this series first. Thanks Chen > Thanks > > > > > > Thanks > > Chen > > > >> -----Original Message----- > >> From: Lukas Straub <lukasstraub2@web.de> > >> Sent: Thursday, March 18, 2021 5:24 AM > >> To: Zhang, Chen <chen.zhang@intel.com> > >> Cc: qemu-devel <qemu-devel@nongnu.org>; Li Zhijian > >> <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > >> Subject: Re: [PATCH 0/2] colo-compare: Fix memory leak for non-tcp > >> packet > >> > >> Hi, > >> This hasn't been merged yet. > >> > >> Regards, > >> Lukas Straub > >> > >> On Mon, 16 Nov 2020 07:32:22 +0000 > >> "Zhang, Chen" <chen.zhang@intel.com> wrote: > >> > >>> Queued this series to COLO tree. > >>> > >>> Thanks > >>> Chen > >>> > >>>> -----Original Message----- > >>>> From: Lukas Straub <lukasstraub2@web.de> > >>>> Sent: Sunday, November 15, 2020 7:19 PM > >>>> To: qemu-devel <qemu-devel@nongnu.org> > >>>> Cc: Zhang, Chen <chen.zhang@intel.com>; Li Zhijian > >>>> <lizhijian@cn.fujitsu.com>; Jason Wang <jasowang@redhat.com> > >>>> Subject: [PATCH 0/2] 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 > >> > >> > >> -- ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-03-18 3:27 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-15 11:18 [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Lukas Straub 2020-11-15 11:19 ` [PATCH 1/2] net/colo-compare.c: " Lukas Straub 2020-11-16 7:31 ` Zhang, Chen 2020-11-15 11:19 ` [PATCH 2/2] net/colo-compare.c: Optimize removal of secondary packet Lukas Straub 2020-11-16 7:31 ` Zhang, Chen 2020-11-16 7:32 ` [PATCH 0/2] colo-compare: Fix memory leak for non-tcp packet Zhang, Chen 2021-03-17 21:23 ` Lukas Straub 2021-03-18 1:22 ` Zhang, Chen 2021-03-18 2:41 ` Jason Wang 2021-03-18 3:26 ` Zhang, Chen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.