All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Edmund Nadolski <enadolski@suse.com>
Cc: jeffm@suse.com, linux-btrfs@vger.kernel.org, lufq.fnst@cn.fujitsu.com
Subject: Re: [PATCH v2 08/13] btrfs: convert prelimary reference tracking to use rbtrees
Date: Tue, 11 Jul 2017 17:15:54 +0200	[thread overview]
Message-ID: <20170711151554.GU2866@twin.jikos.cz> (raw)
In-Reply-To: <20170629035705.1589-9-enadolski@suse.com>

On Wed, Jun 28, 2017 at 09:57:00PM -0600, Edmund Nadolski wrote:
> It's been known for a while that the use of multiple lists
> that are periodically merged was an algorithmic problem within
> btrfs.  There are several workloads that don't complete in any
> reasonable amount of time (e.g. btrfs/130) and others that cause
> soft lockups.
> 
> The solution is to use a pair of rbtrees that do insertion merging
> for both indirect and direct refs, with the former converting
> refs into the latter.  The result is a btrfs/130 workload that
> used to take several hours now takes about half of that. This
> runtime still isn't acceptable and a future patch will address that
> by moving the rbtrees higher in the stack so the lookups can be
> shared across multiple calls to find_parent_nodes.
> 
> Signed-off-by: Edmund Nadolski <enadolski@suse.com>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>

I've bisected to this patch, the self-tests run at module load time
fail:

tests/qgroup-tests.c:272

270         if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID,
271                                 nodesize, nodesize)) {
272                 test_msg("Qgroup counts didn't match expected values\n");
273                 return -EINVAL;
274         }

 245 int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
 246                                u64 rfer, u64 excl)
 247 {
 248         struct btrfs_qgroup *qgroup;
 249
 250         qgroup = find_qgroup_rb(fs_info, qgroupid);
 251         if (!qgroup)
 252                 return -EINVAL;
 253         if (qgroup->rfer != rfer || qgroup->excl != excl)
 254                 return -EINVAL;
 255         return 0;
 256 }

the second if fails, with 0 != 4096 || 0 != 4096

Tested branch was current for-next-test (top commit
8d73f8348287a3d3be10795f45d313f63cdcd72c), with
CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y

  parent reply	other threads:[~2017-07-11 15:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29  3:56 [PATCH v2 00/13] use rbtrees for preliminary backrefs Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 01/13] btrfs: struct-funcs, constify readers Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 02/13] btrfs: constify tracepoint arguments Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 03/13] btrfs: backref, constify some arguments Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 04/13] btrfs: backref, add unode_aux_to_inode_list helper Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 05/13] btrfs: backref, cleanup __ namespace abuse Edmund Nadolski
2017-06-29  3:56 ` [PATCH v2 06/13] btrfs: btrfs_check_shared should manage its own transaction Edmund Nadolski
2017-07-10 16:51   ` David Sterba
2017-06-29  3:56 ` [PATCH v2 07/13] btrfs: remove ref_tree implementation from backref.c Edmund Nadolski
2017-07-10 16:53   ` David Sterba
2017-06-29  3:57 ` [PATCH v2 08/13] btrfs: convert prelimary reference tracking to use rbtrees Edmund Nadolski
2017-07-10 16:59   ` David Sterba
2017-07-11 15:15   ` David Sterba [this message]
2017-07-11 23:12     ` Edmund Nadolski
2017-07-12 15:15       ` David Sterba
2017-06-29  3:57 ` [PATCH v2 09/13] btrfs: add a node counter to each of the rbtrees Edmund Nadolski
2017-06-29  3:57 ` [PATCH v2 10/13] btrfs: backref, add tracepoints for prelim_ref insertion and merging Edmund Nadolski
2017-07-11 17:29   ` David Sterba
2017-06-29  3:57 ` [PATCH v2 11/13] btrfs: add cond_resched() calls when resolving backrefs Edmund Nadolski
2017-06-29  3:57 ` [PATCH v2 12/13] btrfs: allow backref search checks for shared extents Edmund Nadolski
2017-06-29  3:57 ` [PATCH v2 13/13] btrfs: clean up extraneous computations in add_delayed_refs Edmund Nadolski
2017-07-10 17:05 ` [PATCH v2 00/13] use rbtrees for preliminary backrefs 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=20170711151554.GU2866@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=enadolski@suse.com \
    --cc=jeffm@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@cn.fujitsu.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.