• Edmund Nadolski's avatar
    btrfs: convert prelimary reference tracking to use rbtrees · 86d5f994
    Edmund Nadolski authored
    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: default avatarEdmund Nadolski <enadolski@suse.com>
    Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
    Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    86d5f994
backref.c 56 KB