提交 b720d209 编写于 作者: C Chris Mason

Btrfs: Limit the number of async bio submission kthreads to the number of devices

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 db69e0eb
...@@ -1348,7 +1348,9 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1348,7 +1348,9 @@ struct btrfs_root *open_ctree(struct super_block *sb,
* cannot dynamically grow. * cannot dynamically grow.
*/ */
btrfs_init_workers(&fs_info->workers, fs_info->thread_pool_size); btrfs_init_workers(&fs_info->workers, fs_info->thread_pool_size);
btrfs_init_workers(&fs_info->submit_workers, fs_info->thread_pool_size); btrfs_init_workers(&fs_info->submit_workers,
min_t(u64, fs_devices->num_devices,
fs_info->thread_pool_size));
/* a higher idle thresh on the submit workers makes it much more /* a higher idle thresh on the submit workers makes it much more
* likely that bios will be send down in a sane order to the * likely that bios will be send down in a sane order to the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册