linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
To: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks
Date: Thu, 23 Jun 2016 15:17:10 +0200	[thread overview]
Message-ID: <576BE156.90007@mendix.com> (raw)
In-Reply-To: <20160623131352.GC4915@twin.jikos.cz>

On 06/23/2016 03:13 PM, David Sterba wrote:
> On Thu, Jun 23, 2016 at 12:20:38AM +0200, Hans van Kranenburg wrote:
>>> Printing 'usage' is not default as it's quite slow, it uses the search ioctl
>>> and probably not in the best way, or there's some other issue in the
>>> implementation.
>>
>> Interesting.
>>
>> So after reading this, I wrote a little test to test some scenarios:
>>
>> https://github.com/knorrie/python-btrfs/commit/1ca99880dfa0e14b148f3d9e2b6b381b781eb52d
>>
>> It's very clear that the most optimal way of doing this search is to
>> have nr_items=1 and if possible, specify the length in offset.
>
> And that solved it.
>
> [...]
>
>> It seems that searching in the empty space between
>>    (vaddr BLOCK_GROUP_ITEM length+1) and
>>    (vaddr BLOCK_GROUP_ITEM ULLONG_MAX)
>> is really expensive, while there's absolutely nothing to find.
>
> Yeah, the few BLOCK_GROUP_ITEMs are scattered among tons of EXTENT_ITEMs

On the same vaddr objectid, there should only be at most one extent, and 
EXTENT_ITEM_KEY < BLOCK_GROUP_ITEM_KEY, so the space after the block 
group item should always contain exactly 0 items?

Still it takes very long...

-- 
Hans van Kranenburg - System / Network Engineer
Mendix | Driving Digital Innovation | www.mendix.com

  reply	other threads:[~2016-06-23 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 17:26 [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks David Sterba
2016-06-22 22:20 ` Hans van Kranenburg
2016-06-23 13:13   ` David Sterba
2016-06-23 13:17     ` Hans van Kranenburg [this message]
2016-06-23  1:10 ` Hans van Kranenburg
2016-06-23 13:27   ` David Sterba
2016-06-23  1:20 ` Qu Wenruo
2016-06-23 13:07   ` David Sterba
2016-06-23  1:53 ` Liu Bo
2016-06-23 12:43   ` David Sterba

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=576BE156.90007@mendix.com \
    --to=hans.van.kranenburg@mendix.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.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 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).