diff options
author | LOLi <loli10K@users.noreply.github.com> | 2018-03-30 19:10:01 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-03-30 19:10:01 +0000 |
commit | 77d8a0f1a4d0b2f59cee63088f7987cb38e66538 (patch) | |
tree | f06baa3bdb98f5a4740b66ae60fbbf687cb44ca7 /module/zfs/spa.c | |
parent | 2f291ebaed21090afd784f3b376dcb11465a37df (diff) | |
download | src-77d8a0f1a4d0b2f59cee63088f7987cb38e66538.tar.gz src-77d8a0f1a4d0b2f59cee63088f7987cb38e66538.zip |
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 1e9e7b0131b9..4b6196cc3610 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -1187,6 +1187,14 @@ spa_activate(spa_t *spa, int mode) 1, INT_MAX, 0); /* + * Taskq dedicated to prefetcher threads: this is used to prevent the + * pool traverse code from monopolizing the global (and limited) + * system_taskq by inappropriately scheduling long running tasks on it. + */ + spa->spa_prefetch_taskq = taskq_create("z_prefetch", boot_ncpus, + defclsyspri, 1, INT_MAX, TASKQ_DYNAMIC); + + /* * The taskq to upgrade datasets in this pool. Currently used by * feature SPA_FEATURE_USEROBJ_ACCOUNTING/SPA_FEATURE_PROJECT_QUOTA. */ @@ -1213,6 +1221,11 @@ spa_deactivate(spa_t *spa) spa->spa_zvol_taskq = NULL; } + if (spa->spa_prefetch_taskq) { + taskq_destroy(spa->spa_prefetch_taskq); + spa->spa_prefetch_taskq = NULL; + } + if (spa->spa_upgrade_taskq) { taskq_destroy(spa->spa_upgrade_taskq); spa->spa_upgrade_taskq = NULL; |