summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.h
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@gmail.com>2014-03-12 02:28:24 +0100
committerChris Mason <clm@fb.com>2014-03-21 01:15:27 +0100
commitf094c9bd3e12ee83e91f4249b600d4d2ac0a4738 (patch)
treec4ef04ca0623d4e63618133d9ce1593c5e2f45eb /fs/btrfs/async-thread.h
parentBtrfs: return EPERM when deleting a default subvolume (diff)
downloadlinux-f094c9bd3e12ee83e91f4249b600d4d2ac0a4738.tar.xz
linux-f094c9bd3e12ee83e91f4249b600d4d2ac0a4738.zip
Btrfs: less fs tree lock contention when using autodefrag
When finding new extents during an autodefrag, don't do so many fs tree lookups to find an extent with a size smaller then the target treshold. Instead, after each fs tree forward search immediately unlock upper levels and process the entire leaf while holding a read lock on the leaf, since our leaf processing is very fast. This reduces lock contention, allowing for higher concurrency when other tasks want to write/update items related to other inodes in the fs tree, as we're not holding read locks on upper tree levels while processing the leaf and we do less tree searches. Test: sysbench --test=fileio --file-num=512 --file-total-size=16G \ --file-test-mode=rndrw --num-threads=32 --file-block-size=32768 \ --file-rw-ratio=3 --file-io-mode=sync --max-time=1800 \ --max-requests=10000000000 [prepare|run] (fileystem mounted with -o autodefrag, averages of 5 runs) Before this change: 58.852Mb/sec throughtput, read 77.589Gb, written 25.863Gb After this change: 63.034Mb/sec throughtput, read 83.102Gb, written 27.701Gb Test machine: quad core intel i5-3570K, 32Gb of RAM, SSD. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/async-thread.h')
0 files changed, 0 insertions, 0 deletions