xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] xenstore: fix memory leak of xenstored
@ 2016-07-18  7:31 Juergen Gross
  2016-07-18  7:31 ` [PATCH v2 1/5] xenstore: call each xenstored command function with temporary context Juergen Gross
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Juergen Gross @ 2016-07-18  7:31 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.

Changes in V2:
- modified patch description as requested by Ian Jackson
- split up patch 2 as requested by Ian Jackson

Juergen Gross (5):
  xenstore: call each xenstored command function with temporary context
  xenstore: add explicit memory context parameter to get_parent()
  xenstore: add explicit memory context parameter to read_node()
  xenstore: add explicit memory context parameter to get_node()
  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] 17+ messages in thread

end of thread, other threads:[~2016-07-19 10:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18  7:31 [PATCH v2 0/5] xenstore: fix memory leak of xenstored Juergen Gross
2016-07-18  7:31 ` [PATCH v2 1/5] xenstore: call each xenstored command function with temporary context Juergen Gross
2016-07-19 10:04   ` Wei Liu
2016-07-19 10:35   ` Ian Jackson
2016-07-18  7:31 ` [PATCH v2 2/5] xenstore: add explicit memory context parameter to get_parent() Juergen Gross
2016-07-19 10:04   ` Wei Liu
2016-07-19 10:37     ` Ian Jackson
2016-07-19 10:37   ` Ian Jackson
2016-07-18  7:31 ` [PATCH v2 3/5] xenstore: add explicit memory context parameter to read_node() Juergen Gross
2016-07-19 10:04   ` Wei Liu
2016-07-19 10:38     ` Ian Jackson
2016-07-18  7:31 ` [PATCH v2 4/5] xenstore: add explicit memory context parameter to get_node() Juergen Gross
2016-07-19 10:05   ` Wei Liu
2016-07-19 10:39     ` Ian Jackson
2016-07-18  7:31 ` [PATCH v2 5/5] xenstore: use temporary memory context for firing watches Juergen Gross
2016-07-19 10:23   ` Wei Liu
2016-07-19 10:40     ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).