linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: David Sterba <dsterba@suse.cz>, Zach Brown <zab@zabbo.net>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] Btrfs: add leak debug for extent map
Date: Fri, 11 Jan 2013 16:31:36 +0100	[thread overview]
Message-ID: <20130111153136.GL20089@twin.jikos.cz> (raw)
In-Reply-To: <20130110131052.GA3616@liubo>

On Thu, Jan 10, 2013 at 09:11:32PM +0800, Liu Bo wrote:
> On Thu, Jan 10, 2013 at 12:54:26PM +0100, David Sterba wrote:
> > On Thu, Jan 10, 2013 at 10:05:39AM +0800, Liu Bo wrote:
> > > On Tue, Jan 08, 2013 at 12:07:34PM -0800, Zach Brown wrote:
> > > > > This is for detecting extent map leak.
> > > > 
> > > > Hmm, I guess it's cool to get the allocation-specific decoding which you
> > > > don't get from the generic kernel leak tracking?
> > > 
> > > Thanks for the advice, but what allocation-specific decoding do you refer to?
> > > Could you please show me any examples?
> > 
> > IMHO that there's a leak check that is targeted to one exact problem in
> > one subsystem (extent_map in btrfs), does not need to be poked to do a
> > scan-for-leaks so the leak can be reported immediatelly and not after
> > some time. It makes sense for such a core structure like extent_map.
> > Other structures are allocated from a slab so we can at least check for
> > leaks upon module unload.
> 
> Sorry, I don't get your point, but extent map is allocated from its
> slab section as well.
> 
> The 'scan-for-leaks' is just for developers' debug purpose, which
> can tell us some information about the leaked ones, like refs, type, etc.

Yeah, and it's a good thing.

> I think I'm doing the same thing as leak debug for extent_state/extent_buffer.
> We can disable it as default.

We've now gathered several debugging helpers so I'll resend the patch to
add CONFIG_BTRFS_DEBUG and we can put such things under that. Zach
already explained his concerns, mine was a bit off-track sorry :)

david

  reply	other threads:[~2013-01-11 15:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 14:49 [PATCH 1/2] Btrfs: add leak debug for extent map Liu Bo
2013-01-08 14:49 ` [PATCH 2/2] Btrfs: fix memory leak on extent map after fsync Liu Bo
2013-01-24 16:44   ` Josef Bacik
2013-01-25  1:38     ` Liu Bo
2013-01-25  2:23       ` Liu Bo
2013-01-24 16:52   ` Josef Bacik
2013-01-08 20:07 ` [PATCH 1/2] Btrfs: add leak debug for extent map Zach Brown
2013-01-10  2:05   ` Liu Bo
2013-01-10 11:54     ` David Sterba
2013-01-10 13:11       ` Liu Bo
2013-01-11 15:31         ` David Sterba [this message]
2013-01-10 17:06     ` Zach Brown
2013-01-11  8:45       ` Liu Bo
2013-01-11 20:54         ` Zach Brown
2013-01-13 12:18           ` Liu Bo

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=20130111153136.GL20089@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zab@zabbo.net \
    /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 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).