summaryrefslogtreecommitdiff
path: root/tools/spi
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2016-03-25 17:26:00 (GMT)
committerChris Mason <clm@fb.com>2016-06-23 00:57:14 (GMT)
commitc6887cd11149d7325328749f06719071e6c725c6 (patch)
tree2e3ecc39233d9f461c6645ddf093305dcdeeabff /tools/spi
parent0f873eca82a0bee45f38862e0ea2ac7b1c2a31bd (diff)
downloadlinux-c6887cd11149d7325328749f06719071e6c725c6.tar.xz
Btrfs: don't do nocow check unless we have to
Before we write into prealloc/nocow space we have to make sure that there are no references to the extents we are writing into, which means checking the extent tree and csum tree in the case of nocow. So we don't want to do the nocow dance unless we can't reserve data space, since it's a serious drag on performance. With the following sequence fallocate -l10737418240 /mnt/btrfs-test/file cp --reflink /mnt/btrfs-test/file /mnt/btrfs-test/link fio --name=randwrite --rw=randwrite --bs=4k --filename=/mnt/btrfs-test/file \ --end_fsync=1 we get the worst case scenario where we have to fall back on to doing the check anyway. Without this patch lat (usec): min=5, max=111598, avg=27.65, stdev=124.51 write: io=10240MB, bw=126876KB/s, iops=31718, runt= 82646msec With this patch lat (usec): min=3, max=91210, avg=14.09, stdev=110.62 write: io=10240MB, bw=212753KB/s, iops=53188, runt= 49286msec We get twice the throughput, half of the runtime, and half of the average latency. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> [ PAGE_CACHE_ removal related fixups ] Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'tools/spi')
0 files changed, 0 insertions, 0 deletions