diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-11-13 09:59:36 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-13 09:59:36 -0500 |
commit | 6f3577bdc768e6dae3c4d419e89b5a904f470728 (patch) | |
tree | 69d0df75fe55f7c4e9b2f1a1651478e37a3d2920 /fs/btrfs/ctree.c | |
parent | 5b050f04c8ce911c5b6831305a24d70eab95e732 (diff) | |
download | linux-6f3577bdc768e6dae3c4d419e89b5a904f470728.tar.gz linux-6f3577bdc768e6dae3c4d419e89b5a904f470728.tar.bz2 linux-6f3577bdc768e6dae3c4d419e89b5a904f470728.zip |
Btrfs: Improve metadata read latencies
This fixes latency problems on metadata reads by making sure they
don't go through the async submit queue, and by tuning down the amount
of readahead done during btree searches.
Also, the btrfs bdi congestion function is tuned to ignore the
number of pending async bios and checksums pending. There is additional
code that throttles new async bios now and the congestion function
doesn't need to worry about it anymore.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index f82f8db02275..ac61c50a3311 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1285,16 +1285,16 @@ static noinline void reada_for_search(struct btrfs_root *root, } search = btrfs_node_blockptr(node, nr); if ((search >= lowest_read && search <= highest_read) || - (search < lowest_read && lowest_read - search <= 32768) || - (search > highest_read && search - highest_read <= 32768)) { + (search < lowest_read && lowest_read - search <= 16384) || + (search > highest_read && search - highest_read <= 16384)) { readahead_tree_block(root, search, blocksize, btrfs_node_ptr_generation(node, nr)); nread += blocksize; } nscan++; - if (path->reada < 2 && (nread > (256 * 1024) || nscan > 32)) + if (path->reada < 2 && (nread > (64 * 1024) || nscan > 32)) break; - if(nread > (1024 * 1024) || nscan > 128) + if(nread > (256 * 1024) || nscan > 128) break; if (search < lowest_read) |