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 <david.chen@osnexus.com>
This commit is contained in:
Chunwei Chen
2016-11-30 13:56:50 -08:00
parent 616fa7c02b
commit 57ddcda164
7 changed files with 18 additions and 21 deletions
+5
View File
@@ -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;
}