All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] xenstore: fix memory leak of xenstored
@ 2016-07-19 11:30 Juergen Gross
  2016-07-19 11:30 ` [PATCH v3 1/5] xenstore: call each xenstored command function with temporary context Juergen Gross
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Juergen Gross @ 2016-07-19 11:30 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 V3:
- renamed temporary context parameter name and added comments in 
  patches 2-5 as requested by Wei Liu

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        | 134 ++++++++++++++++++++-------------
 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       |  22 ++++--
 tools/xenstore/xenstored_watch.h       |   3 +-
 8 files changed, 123 insertions(+), 77 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-19 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 11:30 [PATCH v3 0/5] xenstore: fix memory leak of xenstored Juergen Gross
2016-07-19 11:30 ` [PATCH v3 1/5] xenstore: call each xenstored command function with temporary context Juergen Gross
2016-07-19 11:30 ` [PATCH v3 2/5] xenstore: add explicit memory context parameter to get_parent() Juergen Gross
2016-07-19 11:30 ` [PATCH v3 3/5] xenstore: add explicit memory context parameter to read_node() Juergen Gross
2016-07-19 11:30 ` [PATCH v3 4/5] xenstore: add explicit memory context parameter to get_node() Juergen Gross
2016-07-19 11:30 ` [PATCH v3 5/5] xenstore: use temporary memory context for firing watches Juergen Gross
2016-07-19 13:19 ` [PATCH v3 0/5] xenstore: fix memory leak of xenstored Wei Liu

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.