Btrfs: Add a mount option to control worker thread pool size

mount -o thread_pool_size changes the default, which is
min(num_cpus + 2, 8).  Larger thread pools would make more sense on
very large disk arrays.

This mount option controls the max size of each thread pool.  There
are multiple thread pools, so the total worker count will be larger
than the mount option.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-06-11 21:47:56 -04:00
parent 35d8ba6629
commit 4543df7ecc
3 changed files with 28 additions and 16 deletions

View File

@@ -532,6 +532,7 @@ struct btrfs_fs_info {
*/
struct btrfs_workers workers;
struct btrfs_workers endio_workers;
int thread_pool_size;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
struct work_struct trans_work;