All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gedalya <gedalya@gedalya.net>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: ian.jackson@eu.citrix.com, 767295@bugs.debian.org,
	xen-devel@lists.xen.org, wei.liu2@citrix.com
Subject: Re: [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel
Date: Tue, 25 Nov 2014 02:14:57 -0500	[thread overview]
Message-ID: <54742C71.6080908@gedalya.net> (raw)
In-Reply-To: <1416825467.26329.30.camel@citrix.com>

On 11/24/2014 05:37 AM, Ian Campbell wrote:
> Unfortunately this is down to the behaviour of the libc and not
> something which appears to be under application control.
>
> The following program demonstrates the same behaviour and is certainly
> not leaking anything. Notice that at "Freed block at XXXXX. Everything
> is now freed, end of day" there is still an anon mapping of that
> address. Notice also that the "in use" figures are zero.
>
> If this concerns you then you should probably take a look at mallopt(3)
> and/or be talking to the libc folks about it. It's not an xl issue
> AFAICT.
Firstly, thank you very much for explaining this in such clear detail, 
above all this has been quite educational for me :-)
After reading the man page, it looks like glibc's behavior here is 
indeed by design. I'm unable to form, much less advocate an opinion 
about how libc should behave, any discussion about libc must be very broad.
Stepping away from the technical details, I still think that any future 
enhancement to make xl go out of its way to free this memory would 
definitely be nice. Right now we have memory that is allocated for a 
single, momentary use and it can stay allocated for the lifetime of a 
domu unnecessarily, taking the size of the xl process to another order 
of magnitude. Even if no longer technically a bug / memory leak, and the 
implied priority, this could still merit someone's attention.

  reply	other threads:[~2014-11-25  7:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 15:48 [PATCH for-4.5 v2] libxc: don't leak buffer containing the uncompressed PV kernel Ian Campbell
2014-11-20 16:03 ` Wei Liu
2014-11-25 16:24   ` Ian Campbell
2014-11-25 16:29     ` Ian Campbell
2014-11-20 16:58 ` Frediano Ziglio
2014-11-20 20:21 ` Konrad Rzeszutek Wilk
2014-11-21  3:13   ` Gedalya
     [not found]   ` <546EADD0.8010002@gedalya.net>
2014-11-21  3:19     ` Gedalya
2014-11-21 11:03     ` Ian Campbell
2014-11-21 11:12       ` Ian Campbell
2014-11-21 20:25         ` Gedalya
2014-11-24 10:37           ` Ian Campbell
2014-11-25  7:14             ` Gedalya [this message]
2014-11-21 20:19       ` Gedalya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54742C71.6080908@gedalya.net \
    --to=gedalya@gedalya.net \
    --cc=767295@bugs.debian.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.