aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2016-11-30 13:56:50 -0800
committerChunwei Chen <[email protected]>2016-12-01 14:52:48 -0800
commit57ddcda1647daac93057dd520a9dc5187c643264 (patch)
treed68cf5f2f862e7c48db89c4ef515798f37219b2b /lib
parent616fa7c02b0cc373f011998f56ed53bb37742d13 (diff)
Use system_delay_taskq for long delay tasks
Use it for spa_deadman, zpl_posix_acl_free, snapentry_expire. This free system_taskq from the above long delay tasks, and allow us to do taskq_wait_outstanding on system_taskq without being blocked forever, making system_taskq more generic and useful. Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/libzpool/taskq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c
index c1f87e173..791d50981 100644
--- a/lib/libzpool/taskq.c
+++ b/lib/libzpool/taskq.c
@@ -32,6 +32,7 @@
int taskq_now;
taskq_t *system_taskq;
+taskq_t *system_delay_taskq;
#define TASKQ_ACTIVE 0x00010000
@@ -353,6 +354,8 @@ system_taskq_init(void)
{
system_taskq = taskq_create("system_taskq", 64, maxclsyspri, 4, 512,
TASKQ_DYNAMIC | TASKQ_PREPOPULATE);
+ system_delay_taskq = taskq_create("delay_taskq", 4, maxclsyspri, 4,
+ 512, TASKQ_DYNAMIC | TASKQ_PREPOPULATE);
}
void
@@ -360,4 +363,6 @@ system_taskq_fini(void)
{
taskq_destroy(system_taskq);
system_taskq = NULL; /* defensive */
+ taskq_destroy(system_delay_taskq);
+ system_delay_taskq = NULL;
}