From: Liu Bo Date: Wed, 5 Mar 2014 02:07:35 +0000 (+0800) Subject: Btrfs: add readahead for send_write X-Git-Tag: v3.15-rc1~96^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2131bcd38b18167f499f190acf3409dfe5b3c280;p=pandora-kernel.git Btrfs: add readahead for send_write Btrfs send reads data from disk and then writes to a stream via pipe or a file via flush. Currently we're going to read each page a time, so every page results in a disk read, which is not friendly to disks, esp. HDD. Given that, the performance can be gained by adding readahead for those pages. Here is a quick test: $ btrfs subvolume create send $ xfs_io -f -c "pwrite 0 1G" send/foobar $ btrfs subvolume snap -r send ro $ time "btrfs send ro -f /dev/null" w/o w real 1m37.527s 0m9.097s user 0m0.122s 0m0.086s sys 0m53.191s 0m12.857s Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: Josef Bacik --- Reading git-diff-tree failed