All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xenstore: fix memory leak of xenstored
@ 2016-07-15  4:57 Juergen Gross
  2016-07-15  4:57 ` [PATCH 1/2] xenstore: call each xenstored command function with temporary context Juergen Gross
  2016-07-15  4:57 ` [PATCH 2/2] xenstore: use temporary memory context for firing watches Juergen Gross
  0 siblings, 2 replies; 7+ messages in thread
From: Juergen Gross @ 2016-07-15  4:57 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

xenstored has a memory leak when setting watches: a no longer active
watch which fired in the past will still use some memory. This is
critical for long running connections to xenstored like the qemu
process serving as a qdisk backend for dom0. It will use some few
kB in xenstored for each domain create/destroy pair.

Fix this leak by using a temporary memory context for all allocations
in xenstored when firing a watch event.

Juergen Gross (2):
  xenstore: call each xenstored command function with temporary context
  xenstore: use temporary memory context for firing watches

 tools/xenstore/xenstored_core.c        | 108 ++++++++++++++++++---------------
 tools/xenstore/xenstored_core.h        |   4 ++
 tools/xenstore/xenstored_domain.c      |  20 +++---
 tools/xenstore/xenstored_domain.h      |  10 +--
 tools/xenstore/xenstored_transaction.c |   5 +-
 tools/xenstore/xenstored_transaction.h |   2 +-
 tools/xenstore/xenstored_watch.c       |  14 +++--
 tools/xenstore/xenstored_watch.h       |   3 +-
 8 files changed, 94 insertions(+), 72 deletions(-)

-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-18  6:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15  4:57 [PATCH 0/2] xenstore: fix memory leak of xenstored Juergen Gross
2016-07-15  4:57 ` [PATCH 1/2] xenstore: call each xenstored command function with temporary context Juergen Gross
2016-07-15 16:19   ` Ian Jackson
2016-07-18  6:44     ` Juergen Gross
2016-07-15  4:57 ` [PATCH 2/2] xenstore: use temporary memory context for firing watches Juergen Gross
2016-07-15 16:21   ` Ian Jackson
2016-07-18  6:44     ` Juergen Gross

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.