summaryrefslogtreecommitdiffstats
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2016-10-10 17:19:14 -0500
committerBrian Behlendorf <[email protected]>2016-10-10 15:19:14 -0700
commitd33931a83a33db4034186dfda6dcdd294ace2c75 (patch)
treeed3f60d617440d0e4012eaffc739c00a81534039 /module/zfs/spa.c
parent57f16600b981f38585a956ae674488640424f711 (diff)
Write issue taskq shouldn't be dynamic
This is as much an upstream compatibility as it's a bit of a performance gain. The illumos taskq implemention doesn't allow a TASKQ_THREADS_CPU_PCT type to be dynamic and in fact enforces as much with an ASSERT. As to performance, if this taskq is dynamic, it can cause excessive contention on tq_lock as the threads are created and destroyed because it can see bursts of many thousands of tasks in a short time, particularly in heavy high-concurrency zvol write workloads. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5236
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 0a480d3ec..bd1134e8f 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -862,7 +862,7 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q)
uint_t count = ztip->zti_count;
spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q];
char name[32];
- uint_t i, flags = TASKQ_DYNAMIC;
+ uint_t i, flags = 0;
boolean_t batch = B_FALSE;
if (mode == ZTI_MODE_NULL) {
@@ -880,6 +880,7 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q)
case ZTI_MODE_FIXED:
ASSERT3U(value, >=, 1);
value = MAX(value, 1);
+ flags |= TASKQ_DYNAMIC;
break;
case ZTI_MODE_BATCH: