Commit 45d5fd14 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason

Btrfs: don't use an async starter for most of our workers

We only need an async starter if we can't make a GFP_NOFS allocation in our
current path.  This is the case for the endio stuff since it happens in IRQ
context, but things like the caching thread workers and the delalloc flushers we
can easily make this allocation and start threads right away.  Also change the
worker count for the caching thread pool.  Traditionally we limited this to 2
since we took read locks while caching, but nowadays we do this lockless so
there's no reason to limit the number of caching threads.  Thanks,
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 7f4f6e0a
...@@ -2483,20 +2483,17 @@ int open_ctree(struct super_block *sb, ...@@ -2483,20 +2483,17 @@ int open_ctree(struct super_block *sb,
&fs_info->generic_worker); &fs_info->generic_worker);
btrfs_init_workers(&fs_info->delalloc_workers, "delalloc", btrfs_init_workers(&fs_info->delalloc_workers, "delalloc",
fs_info->thread_pool_size, fs_info->thread_pool_size, NULL);
&fs_info->generic_worker);
btrfs_init_workers(&fs_info->flush_workers, "flush_delalloc", btrfs_init_workers(&fs_info->flush_workers, "flush_delalloc",
fs_info->thread_pool_size, fs_info->thread_pool_size, NULL);
&fs_info->generic_worker);
btrfs_init_workers(&fs_info->submit_workers, "submit", btrfs_init_workers(&fs_info->submit_workers, "submit",
min_t(u64, fs_devices->num_devices, min_t(u64, fs_devices->num_devices,
fs_info->thread_pool_size), fs_info->thread_pool_size), NULL);
&fs_info->generic_worker);
btrfs_init_workers(&fs_info->caching_workers, "cache", btrfs_init_workers(&fs_info->caching_workers, "cache",
2, &fs_info->generic_worker); fs_info->thread_pool_size, NULL);
/* 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment