aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzpool
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libzpool')
-rw-r--r--lib/libzpool/kernel.c2
-rw-r--r--lib/libzpool/taskq.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index 80da41151..a45102699 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -128,6 +128,7 @@ zk_thread_helper(void *arg)
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
kthread_nr++;
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
+ (void) setpriority(PRIO_PROCESS, 0, kt->t_pri);
kt->t_tid = pthread_self();
((thread_func_arg_t) kt->t_func)(kt->t_arg);
@@ -151,6 +152,7 @@ zk_thread_create(caddr_t stk, size_t stksize, thread_func_t func, void *arg,
kt = umem_zalloc(sizeof (kthread_t), UMEM_NOFAIL);
kt->t_func = func;
kt->t_arg = arg;
+ kt->t_pri = pri;
VERIFY0(pthread_attr_init(&attr));
VERIFY0(pthread_attr_setdetachstate(&attr, detachstate));
diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c
index 59b4c7c05..bd92e61ab 100644
--- a/lib/libzpool/taskq.c
+++ b/lib/libzpool/taskq.c
@@ -308,7 +308,7 @@ taskq_create(const char *name, int nthreads, pri_t pri,
for (t = 0; t < nthreads; t++)
VERIFY((tq->tq_threadlist[t] = thread_create(NULL, 0,
- taskq_thread, tq, TS_RUN, NULL, 0, 0)) != NULL);
+ taskq_thread, tq, TS_RUN, NULL, 0, pri)) != NULL);
return (tq);
}
@@ -371,7 +371,7 @@ taskq_cancel_id(taskq_t *tq, taskqid_t id)
void
system_taskq_init(void)
{
- system_taskq = taskq_create("system_taskq", 64, minclsyspri, 4, 512,
+ system_taskq = taskq_create("system_taskq", 64, maxclsyspri, 4, 512,
TASKQ_DYNAMIC | TASKQ_PREPOPULATE);
}