]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: improve the performance of the csums lookup
authorMiao Xie <miaox@cn.fujitsu.com>
Fri, 5 Apr 2013 07:20:56 +0000 (07:20 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:35 +0000 (15:54 -0400)
commitfaf309876dd23764eb95d1ce4bfc6a6b3809d351
tree2e1b987afa41149ef621581f1eb125c027453f74
parent3077ceaf6d6fcb871fc2c677cb4c90e88a5e016e
Btrfs: improve the performance of the csums lookup

It is very likely that there are several blocks in bio, it is very
inefficient if we get their csums one by one. This patch improves
this problem by getting the csums in batch.

According to the result of the following test, the execute time of
__btrfs_lookup_bio_sums() is down by ~28%(300us -> 217us).

 # dd if=<mnt>/file of=/dev/null bs=1M count=1024

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/file-item.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h