]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: flush the dirty pages of the ordered extent aggressively during logging csum
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 14 Jan 2014 12:31:52 +0000 (20:31 +0800)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:20:37 +0000 (13:20 -0800)
commit4f39b573c62163bf94b842844a1bf17a03b83484
treeb8ae22e5b2e0566754f5343c1f15fd048c9eb3de
parent57985ab6b4f4ef6f6482e019baae688c41b4e030
Btrfs: flush the dirty pages of the ordered extent aggressively during logging csum

The performance of fsync dropped down suddenly sometimes, the main reason
of this problem was that we might only flush part dirty pages in a ordered
extent, then got that ordered extent, wait for the csum calcucation. But if
no task flushed the left part, we would wait until the flusher flushed them,
sometimes we need wait for several seconds, it made the performance drop
down suddenly. (On my box, it drop down from 56MB/s to 4-10MB/s)

This patch improves the above problem by flushing left dirty pages aggressively.

Test Environment:
CPU: 2CPU * 2Cores
Memory: 4GB
Partition: 20GB(HDD)

Test Command:
 # sysbench --num-threads=8 --test=fileio --file-num=1 \
 > --file-total-size=8G --file-block-size=32768 \
 > --file-io-mode=sync --file-fsync-freq=100 \
 > --file-fsync-end=no --max-requests=10000 \
 > --file-test-mode=rndwr run

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/tree-log.c