All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: ejt@redhat.com, dm-devel@redhat.com
Subject: Re: [PATCH 1/2] dm thin: fix memory leak of singleton bio-prison cell
Date: Mon, 23 Apr 2012 10:26:39 +0100	[thread overview]
Message-ID: <20120423092638.GA11835@ubuntu> (raw)
In-Reply-To: <20120423100246.GA4073@agk-dp.fab.redhat.com>

On Mon, Apr 23, 2012 at 11:02:46AM +0100, Alasdair G Kergon wrote:
> On Mon, Apr 23, 2012 at 08:24:08AM +0100, Joe Thornber wrote:
> > On Thu, Apr 12, 2012 at 06:34:34PM -0400, Mike Snitzer wrote:
> > > Add missing mempool_free() to __cell_release_singleton().
> > > 
> > > This is a pretty significant leak that will accumulate to over 2GB of
> > > leaked memory just from running the full thinp-test-suite.
> > When was this introduced?  With agk's tweaks for 3.4?
>  
> I think it was here:
>   http://www.redhat.com/archives/dm-devel/2012-March/msg00080.html

Yep, this should call mempool_release:

@@ -305,22 +310,45 @@ static void cell_release(struct cell *cell, struct bio_list *bios)
  * bio may be in the cell.  This function releases the cell, and also does
  * a sanity check.
  */
+static void __cell_release_singleton(struct cell *cell, struct bio *bio)
+{
+	hlist_del(&cell->list);
+	BUG_ON(cell->holder != bio);
+	BUG_ON(!bio_list_empty(&cell->bios));
+}
+

      reply	other threads:[~2012-04-23  9:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 22:34 [PATCH 1/2] dm thin: fix memory leak of singleton bio-prison cell Mike Snitzer
2012-04-12 22:34 ` [PATCH 2/2] dm thin: use slab_pool for caches Mike Snitzer
2012-04-12 22:39   ` [PATCH 2/2 v2] dm thin: use slab mempools with local caches Mike Snitzer
2012-04-23  7:24 ` [PATCH 1/2] dm thin: fix memory leak of singleton bio-prison cell Joe Thornber
2012-04-23 10:02   ` Alasdair G Kergon
2012-04-23  9:26     ` Joe Thornber [this message]

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=20120423092638.GA11835@ubuntu \
    --to=thornber@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=ejt@redhat.com \
    /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.