diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-08-15 15:34:18 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
commit | 53863232ef961778aa414b700ed88a48e8e871e6 (patch) | |
tree | 05a74ac264a5fb4f6b8824771f5820ca5907afe5 /fs/btrfs/disk-io.c | |
parent | 4854ddd0ed0a687fc2d7c45a529c406232e31e7b (diff) | |
download | blackbird-op-linux-53863232ef961778aa414b700ed88a48e8e871e6.tar.gz blackbird-op-linux-53863232ef961778aa414b700ed88a48e8e871e6.zip |
Btrfs: Lower contention on the csum mutex
This takes the csum mutex deeper in the call chain and releases it
more often.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1aed1f4616b6..92e14dd9bddb 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1386,7 +1386,14 @@ struct btrfs_root *open_ctree(struct super_block *sb, * devices */ fs_info->submit_workers.idle_thresh = 64; - fs_info->workers.idle_thresh = 32; + + /* fs_info->workers is responsible for checksumming file data + * blocks and metadata. Using a larger idle thresh allows each + * worker thread to operate on things in roughly the order they + * were sent by the writeback daemons, improving overall locality + * of the IO going down the pipe. + */ + fs_info->workers.idle_thresh = 128; btrfs_init_workers(&fs_info->fixup_workers, "fixup", 1); btrfs_init_workers(&fs_info->endio_workers, "endio", |