Skip to content

Commit

Permalink
btrfs: convert prelimary reference tracking to use rbtrees
Browse files Browse the repository at this point in the history
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 set 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>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Edmund Nadolski authored and David Sterba committed Aug 16, 2017
1 parent f695424 commit 86d5f99
Showing 1 changed file with 285 additions and 157 deletions.
Loading

0 comments on commit 86d5f99

Please sign in to comment.